<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tenegri's blog &#187; Flash</title>
	<atom:link href="http://blog.tengerstudio.com/category/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tengerstudio.com</link>
	<description>Problems, questions and discoveries related to my daily development work</description>
	<lastBuildDate>Sat, 19 Dec 2009 03:29:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Switching back to 2D from 3D</title>
		<link>http://blog.tengerstudio.com/2009/09/13/switching-back-to-2d-from-3d/</link>
		<comments>http://blog.tengerstudio.com/2009/09/13/switching-back-to-2d-from-3d/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 17:48:00 +0000</pubDate>
		<dc:creator>tenegri</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://blog.tengerstudio.com/?p=15</guid>
		<description><![CDATA[In Flash 10 display objects can be transformed in the 3D space. That&#8217;s very nice, but due to the implementation the appearence of an objects can become a little bit different (blurry) after transforming it in 3D (changing its z, rotationX/Y/Z property, etc.), even if the object is reverted exactly in the same position as [...]]]></description>
			<content:encoded><![CDATA[<p>In Flash 10 display objects can be transformed in the 3D space. That&#8217;s very nice, but due to the implementation the appearence of an objects can become a little bit different (blurry) after transforming it in 3D (changing its z, rotationX/Y/Z property, etc.), even if the object is reverted exactly in the same position as it was before the 3D transformation. Actually when an object is transformed in 3D space Flash takes a bitmap snapshot of its content and this bitmap is what transformed and displayed in real. In order to raise the bitmap&#8217;s quality a smoothing is applied to it, and this smoothing causes the difference and the blur. It is noticable especially on textfields.<br />
<span id="more-15"></span><br />
Here is a demonstration:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> caurina.<span style="color: #006600;">transitions</span>.<span style="color: #66cc66;">*</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> box1: TextBox = <span style="color: #000000; font-weight: bold;">new</span> TextBox<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">// TextBox is a symbol in the library</span>
box1.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">30</span>;
box1.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">35</span>;
addChild<span style="color: #66cc66;">&#40;</span>box1<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> box2: TextBox = <span style="color: #000000; font-weight: bold;">new</span> TextBox<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
box2.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">270</span>;
box2.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">35</span>;
addChild<span style="color: #66cc66;">&#40;</span>box2<span style="color: #66cc66;">&#41;</span>;
&nbsp;
box1.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, click<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> click<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>: MouseEvent<span style="color: #66cc66;">&#41;</span>: <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
  Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span>box1, <span style="color: #66cc66;">&#123;</span>z: <span style="color: #cc66cc;">200</span>, <span style="color: #0066CC;">time</span>: <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
  Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span>box1, <span style="color: #66cc66;">&#123;</span>z: <span style="color: #cc66cc;">0</span>, <span style="color: #0066CC;">time</span>: <span style="color: #cc66cc;">1</span>, delay: <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>


<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_3d2d_707115706"
			class="flashmovie"
			width="450"
			height="200">
	<param name="movie" value="http://blog.tengerstudio.com/public/3d2d.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://blog.tengerstudio.com/public/3d2d.swf"
			name="fm_3d2d_707115706"
			width="450"
			height="200">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>When you click the left text box it will move back and forth to its original position, but after the animation (after using 3D transformation) the text becomes blurry (compare to the text on the right).</p>
<p>When a DisplayObject is started to be transformed in 3D, then its transform.matrix3D property is used instead of transform.matrix, which is used for 2D transformations. If we could switch back to using transform.matrix, the smoothing and its effect would be disappear. After starting to transform an object in 3D it will not switch back automatically to 2D/transform.matrix at any time, so we have to do it manually. When transform.matrix3D is in use, the value of transform.matrix is null, and vice versa if transform.matrix is in use, the value of transform.matrix3D is null. If we nullify any of these properties manually, Flash automatically switches to using the other one (with a default identity matrix). The same effect if we assign a value (a Matrix or Matrix3D reference) to the currently unused property. So the only thing what we need to do is saving the original transform.matrix value before starting 3D transformations and restoring it when we want to switch back to 2D. The example below extends the previous one. It saves the Matrix stored in transform.matrix before starting the 3D animation, and assigns it again when the animation is complete.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> caurina.<span style="color: #006600;">transitions</span>.<span style="color: #66cc66;">*</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> box1: TextBox = <span style="color: #000000; font-weight: bold;">new</span> TextBox<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">// TextBox is a symbol in the library</span>
box1.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">20</span>;
box1.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">35</span>;
addChild<span style="color: #66cc66;">&#40;</span>box1<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> box2: TextBox = <span style="color: #000000; font-weight: bold;">new</span> TextBox<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
box2.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">230</span>;
box2.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">35</span>;
addChild<span style="color: #66cc66;">&#40;</span>box2<span style="color: #66cc66;">&#41;</span>;
&nbsp;
box1.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, click<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> oldMatrix: Matrix;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> click<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>: MouseEvent<span style="color: #66cc66;">&#41;</span>: <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
  <span style="color: #808080; font-style: italic;">// if no tween in progress</span>
  <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">!</span>Tweener.<span style="color: #006600;">isTweening</span><span style="color: #66cc66;">&#40;</span>box1<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    oldMatrix = box1.<span style="color: #006600;">transform</span>.<span style="color: #006600;">matrix</span>;
    Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span>box1, <span style="color: #66cc66;">&#123;</span>z: <span style="color: #cc66cc;">200</span>, <span style="color: #0066CC;">time</span>: <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
    Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span>box1, <span style="color: #66cc66;">&#123;</span>z: <span style="color: #cc66cc;">0</span>, <span style="color: #0066CC;">time</span>: <span style="color: #cc66cc;">1</span>, delay: <span style="color: #cc66cc;">1</span>, onComplete: tweenComplete<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> tweenComplete<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>: <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
  box1.<span style="color: #006600;">transform</span>.<span style="color: #006600;">matrix</span> = oldMatrix;
<span style="color: #66cc66;">&#125;</span></pre></div></div>


<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_3d2d_2_1346725926"
			class="flashmovie"
			width="450"
			height="200">
	<param name="movie" value="http://blog.tengerstudio.com/public/3d2d_2.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://blog.tengerstudio.com/public/3d2d_2.swf"
			name="fm_3d2d_2_1346725926"
			width="450"
			height="200">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>We could omit the saving of the old matrix, of course, since assigning null to transform.matrix3D also switches back to 2D, but in this case a new identity matrix will be stored in transform.matrix, so we have to take care of transforming our object to the desired position.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tengerstudio.com/2009/09/13/switching-back-to-2d-from-3d/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Multi-column text</title>
		<link>http://blog.tengerstudio.com/2009/06/07/multi-column-text/</link>
		<comments>http://blog.tengerstudio.com/2009/06/07/multi-column-text/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 17:14:43 +0000</pubDate>
		<dc:creator>tenegri</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[ActionScrip 2]]></category>
		<category><![CDATA[column]]></category>
		<category><![CDATA[multi-column]]></category>

		<guid isPermaLink="false">http://blog.tengerstudio.com/?p=14</guid>
		<description><![CDATA[Recently somebody asked about creating multi-column text flow in ActionScript 2. I have suggested ActionScript 3 since it offers relatively simple solution, but after few minutes of thinking also figured out a solution for ActionScript 2. I know that AS2 is quite obsolete now and I personally don&#8217;t use it, only when it is unescapable, [...]]]></description>
			<content:encoded><![CDATA[<p>Recently somebody asked about creating multi-column text flow in ActionScript 2. I have suggested ActionScript 3 since it offers relatively simple solution, but after few minutes of thinking also figured out a solution for ActionScript 2. I know that AS2 is quite obsolete now and I personally don&#8217;t use it, only when it is unescapable, but probably there are still many people using it on daily basis for different reasons (legacy projects, target player version limitations, etc.), so even an AS2 solution may be useful.<br />
<span id="more-14"></span><br />
So, how to do that in AS2? Since there is no built-in support for formatting a text field&#8217;s content into multiple columns, we have to create it from scratch. Placing text fields beside each other and filling them with text chunks, which exactly fit into them seems to be what we need. The only problem is splitting the text to be displayed into chunks according to columns. Basically we need to know where is the end of the text that fits into a text field (= column) in order to determine the beggining of the text to be placed into the next text field or column. In AS2 there is no way to know which is the last visible character in a text field, but we have information on the vertical scroll position of the last line and it will be quite enough for us. We will not split the text into parts, instead we place the same text into each column (= text field) and set their vertical scrolling position based on the last visible line of the previous column. The scrolling position of the first visible line can be set by the <code>scroll</code> property of the TextField class, and the scroll position of the last line is in the <code>bottomScroll</code> property. The last column requires a little bit more attention, since its visible content probably will not fill the entire column, but a text field&#8217;s last line can be displayed at the bottom only. In order to avoid this we will add some blank lines to the content of the last column.</p>
<p>Here is the proof of concept script, which takes a string and creates as many text fields (= columns) as many required to display the whole text. The script can be placed directly on a frame of an empty .fla and it will work. This script is a proof of concept only, it could be wrapped into a nice class for general use, but this work should be done by somebody else <img src='http://blog.tengerstudio.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  (or by me, if I will need it in a real project, but that&#8217;s not the case at the moment).</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// the text to be displayed in multiple columns</span>
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">text</span>: <span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;Lorem ipsum dolor sit amet...&quot;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">// the width of a column in pixels</span>
<span style="color: #000000; font-weight: bold;">var</span> columnWidth: <span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">200</span>;
<span style="color: #808080; font-style: italic;">// the height of a column in pixels</span>
<span style="color: #000000; font-weight: bold;">var</span> columnHeight: <span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">300</span>;
<span style="color: #808080; font-style: italic;">// the space betweeb columns in pixels</span>
<span style="color: #000000; font-weight: bold;">var</span> columnSpacing: <span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">10</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">// the format of the text in the columns</span>
<span style="color: #000000; font-weight: bold;">var</span> tf: <span style="color: #0066CC;">TextFormat</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextFormat</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
tf.<span style="color: #0066CC;">font</span> = <span style="color: #ff0000;">&quot;Arial&quot;</span>;
tf.<span style="color: #0066CC;">size</span> = <span style="color: #cc66cc;">12</span>;
tf.<span style="color: #0066CC;">align</span> = <span style="color: #ff0000;">&quot;left&quot;</span>;
tf.<span style="color: #0066CC;">color</span> = 0x000000;
&nbsp;
<span style="color: #808080; font-style: italic;">// the index of the column currently processed</span>
<span style="color: #000000; font-weight: bold;">var</span> colIndex: <span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">0</span>;
<span style="color: #808080; font-style: italic;">// the index of the previous column</span>
<span style="color: #000000; font-weight: bold;">var</span> prevColumn: <span style="color: #0066CC;">TextField</span>;
<span style="color: #808080; font-style: italic;">// true, if we have placed the last column and can quit the loop</span>
<span style="color: #000000; font-weight: bold;">var</span> done: <span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;
&nbsp;
<span style="color: #b1b100;">do</span> <span style="color: #66cc66;">&#123;</span>
<span style="color: #808080; font-style: italic;">// create a text field for the current column</span>
<span style="color: #000000; font-weight: bold;">var</span> column: <span style="color: #0066CC;">TextField</span> = <span style="color: #0066CC;">createTextField</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;column&quot;</span> + colIndex, <span style="color: #0066CC;">getNextHighestDepth</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>, colIndex <span style="color: #66cc66;">*</span> <span style="color: #66cc66;">&#40;</span>columnWidth + columnSpacing<span style="color: #66cc66;">&#41;</span>, <span style="color: #cc66cc;">0</span>, columnWidth, columnHeight<span style="color: #66cc66;">&#41;</span>;
<span style="color: #808080; font-style: italic;">// set some properties of the text field</span>
column.<span style="color: #0066CC;">border</span> = <span style="color: #000000; font-weight: bold;">true</span>;
column.<span style="color: #0066CC;">multiline</span> = <span style="color: #000000; font-weight: bold;">true</span>;
column.<span style="color: #0066CC;">wordWrap</span> = <span style="color: #000000; font-weight: bold;">true</span>;
<span style="color: #808080; font-style: italic;">// selectable should be false, otherwise the text field's content will be scrollable,</span>
<span style="color: #808080; font-style: italic;">// and that can mess our precisely positioned text columns</span>
column.<span style="color: #0066CC;">selectable</span> = <span style="color: #000000; font-weight: bold;">false</span>;
column.<span style="color: #0066CC;">setNewTextFormat</span><span style="color: #66cc66;">&#40;</span>tf<span style="color: #66cc66;">&#41;</span>;
<span style="color: #808080; font-style: italic;">// place the whole text into each column</span>
column.<span style="color: #0066CC;">text</span> = <span style="color: #0066CC;">text</span>;
<span style="color: #808080; font-style: italic;">// if it is not the first column...</span>
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>prevColumn <span style="color: #66cc66;">!</span>= <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
<span style="color: #808080; font-style: italic;">// check whether the last visible line is beyond the last scrollable line, so did we reach</span>
<span style="color: #808080; font-style: italic;">// the last text chunk and the last column or not</span>
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>prevColumn.<span style="color: #0066CC;">bottomScroll</span> <span style="color: #66cc66;">&amp;</span>gt; prevColumn.<span style="color: #0066CC;">maxscroll</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
<span style="color: #808080; font-style: italic;">// calculate how many lines are missing from the last chunk to form a whole column</span>
<span style="color: #000000; font-weight: bold;">var</span> missingLines: <span style="color: #0066CC;">Number</span> = prevColumn.<span style="color: #0066CC;">bottomScroll</span> - prevColumn.<span style="color: #0066CC;">maxscroll</span> + colIndex;
<span style="color: #808080; font-style: italic;">// append so many lines to the content of the last column</span>
<span style="color: #000000; font-weight: bold;">var</span> s: <span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;&quot;</span>;
<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i: <span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&amp;</span>lt; missingLines; i++<span style="color: #66cc66;">&#41;</span>
s += <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
column.<span style="color: #0066CC;">text</span> += s;
<span style="color: #808080; font-style: italic;">// and quit at the end of the loop, since we reached the last column</span>
done = <span style="color: #000000; font-weight: bold;">true</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">// scroll to the line following the last visible line of the previous column</span>
column.<span style="color: #0066CC;">scroll</span> = prevColumn.<span style="color: #0066CC;">bottomScroll</span> + <span style="color: #cc66cc;">1</span>;
<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
<span style="color: #808080; font-style: italic;">// in the case of the first column check whether we have the text</span>
<span style="color: #808080; font-style: italic;">// long enough for displaying at least one more column (is the text field scrollable)</span>
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>column.<span style="color: #0066CC;">maxscroll</span> <span style="color: #66cc66;">&amp;</span>lt;= <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>
done = <span style="color: #000000; font-weight: bold;">true</span>
<span style="color: #66cc66;">&#125;</span>
prevColumn = column;
colIndex++;
<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">!</span>done<span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>That&#8217;s all &#8211; enjoy <img src='http://blog.tengerstudio.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Update: I corrected the script according to Mau&#8217;s observation. Thank you Mau for catching the bug!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tengerstudio.com/2009/06/07/multi-column-text/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Some videos on Flash CS4</title>
		<link>http://blog.tengerstudio.com/2008/06/03/some-videos-on-flash-cs4/</link>
		<comments>http://blog.tengerstudio.com/2008/06/03/some-videos-on-flash-cs4/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 21:10:08 +0000</pubDate>
		<dc:creator>tenegri</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[CS4]]></category>

		<guid isPermaLink="false">http://blog.tengerstudio.com/?p=12</guid>
		<description><![CDATA[New tween engine
Inverse kinematics engine
3D tools
Design time video playing &#038; inverse kinematics
New tween engine &#038; 3D &#038; inverse kinematics
Thanks to Reider for the links  
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.youtube.com/watch?v=8_wRMswNLiU">New tween engine</a><br />
<a href="http://www.youtube.com/watch?v=wDjewbDF4bo">Inverse kinematics engine</a><br />
<a href="http://www.youtube.com/watch?v=0GAbMRj0IV0">3D tools</a><br />
<a href="http://www.youtube.com/watch?v=vqMI480D668">Design time video playing &#038; inverse kinematics</a><br />
<a href="http://www.youtube.com/watch?v=AnJKimyTIjo">New tween engine &#038; 3D &#038; inverse kinematics</a></p>
<p>Thanks to Reider for the links <img src='http://blog.tengerstudio.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tengerstudio.com/2008/06/03/some-videos-on-flash-cs4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Useful resources for Flash 10</title>
		<link>http://blog.tengerstudio.com/2008/05/19/useful-resources-for-flash-10/</link>
		<comments>http://blog.tengerstudio.com/2008/05/19/useful-resources-for-flash-10/#comments</comments>
		<pubDate>Mon, 19 May 2008 20:28:35 +0000</pubDate>
		<dc:creator>tenegri</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flash 10]]></category>

		<guid isPermaLink="false">http://blog.tengerstudio.com/?p=11</guid>
		<description><![CDATA[In this post I collected some useful resources related to Flash 10, which I found up to now. I&#8217;m going to keep this list up to date and extend it as I obtain more interesting links.
Targeting Flash Player 10 beta and development tools
1. Targeting Flash Player 10 Beta with Flex SDK 3.0.x
2. Flex 3 SDK [...]]]></description>
			<content:encoded><![CDATA[<p>In this post I collected some useful resources related to Flash 10, which I found up to now. I&#8217;m going to keep this list up to date and extend it as I obtain more interesting links.</p>
<p><strong>Targeting Flash Player 10 beta and development tools</strong><br />
1. <a href="http://opensource.adobe.com/wiki/display/flexsdk/Targeting+Flash+Player+10+Beta+with+Flex+SDK+3.0.x" target="_blank">Targeting Flash Player 10 Beta with Flex SDK 3.0.x</a><br />
2. <a href="http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+3" target="_blank">Flex 3 SDK Downloads &#8211; The latest Flex SDK, which is capable of compiling Flash 10 targeted movies. Also includes a stand-alone debug player (version 10)</a><br />
3. <a href="http://www.flashdevelop.org/community/viewtopic.php?t=3039" target="_blank">Flash Player 10 support in FlashDevelop</a><br />
4. <a href="http://www.gotoandlearn.com/player.php?id=73" target="_blank">How to get started with creating content for Flash Player 10 (video tutorial)</a></p>
<p><strong>3D, the new Drawing API, GPU acceleration</strong><br />
1. <a href="http://www.senocular.com/flash/tutorials/flash10drawingapi" target="_blank">Senocular: Flash Player 10 Drawing API</a><br />
2. <a href="http://www.kaourantin.net/2008/05/what-does-gpu-acceleration-mean.html" target="_blank">Tinic Uro: What does GPU acceleration mean?</a><br />
3. <a href="http://www.gotoandlearn.com/player.php?id=74" target="_blank">How to take ordinary display objects into the third dimension in Astro (video tutorial)</a><br />
4. <a href="http://blogs.adobe.com/penguin.swf/2008/05/flash_uses_the_gpu.html" target="_blank">Mike Melanson: Flash Uses The GPU</a></p>
<p><strong>Creating dynamic sounds</strong><br />
1. <a href="http://www.kaourantin.net/2008/05/adobe-is-making-some-noise-part-1.html" target="_blank">Tinic Uro: Adobe is making some noise. Part 1</a><br />
2. <a href="http://www.kaourantin.net/2008/05/adobe-is-making-some-noise-part-2.html" target="_blank">Tinic Uro: Adobe is making some noise. Part 2</a><br />
3. <a href="http://www.kaourantin.net/2008/05/adobe-is-making-some-noise-part-3.html" target="_blank">Tinic Uro: Adobe is making some noise. Part 3</a><br />
4. <a href="http://www.bit-101.com/blog/?p=1264" target="_blank">Keith Peters: Astro dynamic sound!</a><br />
5. <a href="http://www.gotoandlearn.com/player.php?id=75" target="_blank">How to dynamically create sounds using the new features in Astro (video tutorial)</a><br />
6. <a href="http://www.blixtsystems.com/2008/05/random-thoughts-on-vectors-and-samplescallbackdata/" target="_blank">Leo Bergman: Random thoughts on Vectors and samplesCallbackData</a></p>
<p><strong>Advanced text rendering</strong><br />
1. <a href="http://www.flashmagazine.com/news/detail/flash_player_10_feature_new_text_engine/" target="_blank">New text engine</a></p>
<p><strong>Loading and saving files without server (FileReference)</strong><br />
1. <a href="http://www.flashmagazine.com/news/detail/flash_player_10_new_feature_load_and_save_files_using_filereference/" target="_blank">Load and save files using FileReference</a><br />
2. <a href="http://www.gotoandlearn.com/player.php?id=76" target="_blank">How to read and write local files using the new methods of the FileReference class (video tutorial)</a></p>
<p><strong>Streaming, peer-to-peer audio and video</strong><br />
1. <a href="http://www.flashcomguru.com/index.cfm/2008/5/15/player-10-beta-speex-p2p-rtmfp" target="_blank">Peer to peer, Speex and UDP now in Flash Player 1</a><br />
2. <a href="http://justin.everett-church.com/index.php/2008/05/16/rtmfp-in-flash-player-10-beta/" target="_blank">Justin Everett-Church: RTMFP in Flash Player 10 beta</a><br />
3. <a href="http://justin.everett-church.com/index.php/2008/05/23/astrop2p/" target="_blank">Justin Everett-Church: Peer to Peer (P2P) in Flash Player 10 beta</a></p>
<p><strong>Other topics</strong><br />
1. <a href="http://www.blixtsystems.com/2008/05/random-thoughts-on-vectors-and-samplescallbackdata/" target="_blank">Leo Bergman: Random thoughts on Vectors and samplesCallbackData</a></p>
<p><strong>Documentation</strong><br />
1. <a href="http://dev.dschini.org/astro/api/" target="_blank">Flash Player 10 (Astro) API (new additions only)</a><br />
2. <a href="http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_as3langref_052008.zip" target="_blank">Flash Player 10 Language Reference (official Adobe documentation)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tengerstudio.com/2008/05/19/useful-resources-for-flash-10/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flash Player 10 Class Browser</title>
		<link>http://blog.tengerstudio.com/2008/05/16/flash-player-10-class-browser/</link>
		<comments>http://blog.tengerstudio.com/2008/05/16/flash-player-10-class-browser/#comments</comments>
		<pubDate>Fri, 16 May 2008 09:01:08 +0000</pubDate>
		<dc:creator>tenegri</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Astro]]></category>
		<category><![CDATA[Flash 10]]></category>

		<guid isPermaLink="false">http://blog.tengerstudio.com/?p=10</guid>
		<description><![CDATA[Since there is no public documentation for the new Flash Player 10 API I have created a small Flex application which makes easier to discover the properties and methods of the new classes. I also extracted the list of classes defined in the Flash 10&#8217;s playerglobal.swc (it is accessible in the latest build of Flex [...]]]></description>
			<content:encoded><![CDATA[<p>Since there is no public documentation for the new Flash Player 10 API I have created a small Flex application which makes easier to discover the properties and methods of the new classes. I also extracted the list of classes defined in the Flash 10&#8217;s playerglobal.swc (it is accessible in the latest build of Flex SDK) and placed into the class browser. So, now you can pick a class name from this list or enter a class name of your choice, click on the Describe button and see the result.</p>
<p>The class browser is on-line <a href="http://www.tengerstudio.com/public/flash10/class_browser" target="_blank">here</a>.</p>
<p>Maybe I will post the results of my (and other&#8217;s) discoveries later with examples <img src='http://blog.tengerstudio.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Some keywords till then (beyond the features mentioned on Adobe&#8217;s site):</p>
<ul>
<li>run-time sound generation</li>
<li>accessing local files through FileReference without uploading to a server</li>
<li>new Vector class with generics</li>
<li>etc.</li>
</ul>
<p>[Update]<br />
Some people reported that the class browser doesn&#8217;t worksand the version detection script prevents it from running (claiming a new player installation). I don&#8217;t know what does cause the problem, yet, but I provide here a direct link to the SWF itself until I solve the issue:<br />
<a href="http://tengerstudio.com/public/flash10/class_browser/ClassBrowser.swf" target="_blank">http://tengerstudio.com/public/flash10/class_browser/ClassBrowser.swf</a></p>
<p>[Update 2]<br />
I made a minor addition, and the class browser now displays also the class&#8217; constructor among the methods.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tengerstudio.com/2008/05/16/flash-player-10-class-browser/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Flash Player 10 beta released</title>
		<link>http://blog.tengerstudio.com/2008/05/16/flash-player-10-beta-released/</link>
		<comments>http://blog.tengerstudio.com/2008/05/16/flash-player-10-beta-released/#comments</comments>
		<pubDate>Thu, 15 May 2008 23:13:42 +0000</pubDate>
		<dc:creator>tenegri</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Astro]]></category>
		<category><![CDATA[Flash 10]]></category>

		<guid isPermaLink="false">http://blog.tengerstudio.com/?p=9</guid>
		<description><![CDATA[Adobe released the beta version of the next Flash Player 10 (codename Astro). Further details, downloads, examples and videos are here:
http://labs.adobe.com/technologies/flashplayer10/
The development tools are not published yet, but you can configure Flex SDK to compile to Flash Player 10. Here is the how to.
If somebody is not familiar with Flex, it is possible to use [...]]]></description>
			<content:encoded><![CDATA[<p>Adobe released the beta version of the next Flash Player 10 (codename Astro). Further details, downloads, examples and videos are here:</p>
<p><a title="http://labs.adobe.com/technologies/flashplayer10/" href="http://labs.adobe.com/technologies/flashplayer10/" target="_blank">http://labs.adobe.com/technologies/flashplayer10/</a></p>
<p>The development tools are not published yet, but you can configure Flex SDK to compile to Flash Player 10. <a href="http://opensource.adobe.com/wiki/display/flexsdk/Targeting+Flash+Player+10+Beta+with+Flex+SDK+3.0.x" target="_blank">Here</a> is the how to.</p>
<p>If somebody is not familiar with Flex, it is possible to use Flash CS3 for the same purpose by utilizing some minor hacks. Just follow these steps:<br />
<span id="more-9"></span><br />
1. Create your Flash movie and write ActionScript with the current development tool (Flash CS3).</p>
<p>2. While writing your ActionScript code take into consideration that the new identifiers, methods and properties will not be recognized by the compiler, so use square brackets where necessary, so instead myObject.propertyName use myObject["propertyName"], and instead myObject.methodName() use myObject["methodName"]().</p>
<p>3. Compile the sources into a SWF file.</p>
<p>4. (This step seems to be optional.) Up to now my SWFs compiled for player 9 were running in Flash Player 10 without any change, and I could use the new features. However it seems possible that setting the target version to 10 is required in some cases, so if you meet such case just change the 4th byte of the SWF file to hexadecimal value 0A (decimal 10 &#8211; this byte indicates the target player version) using a hexa editor (e.g.: <a title="XVI32" href="http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm" target="_blank">XVI32</a>).</p>
<p>5. Create an HTML document for embedding your Flash movie. I used <a title="http://code.google.com/p/swfobject/" href="http://code.google.com/p/swfobject/" target="_blabk">SWFObject 2</a>, which is compatible with Flash Player 10, and the embedding HTML looks like this one:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&amp;lt; !DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&amp;gt;
&nbsp;
		&lt;script src=&quot;http://blog.tengerstudio.com/wp-admin/swfobject.js&quot; type=&quot;text/javascript&quot;&gt;&lt;!--mce:0--&gt;&lt;/script&gt;
		&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--mce:1--&gt;&lt;/script&gt;
&lt;div id=&quot;myContent&quot;&gt;
&lt;h1&gt;Alternative content&lt;/h1&gt;
&lt;a href=&quot;http://www.adobe.com/go/getflashplayer&quot;&gt;&lt;img src=&quot;http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif&quot; alt=&quot;Get Adobe Flash player&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</pre></div></div>

<p>Replace the parameter values of the embedSWF() method and let&#8217;s go. Don&#8217;t forget to place swfobject.js into the same directory as the HTML document, and of course install Flash Player 10 <img src='http://blog.tengerstudio.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Here is a small sample script which uses the new 3D features for creating a rotating object:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> ns: Namespace = <span style="color: #000000; font-weight: bold;">new</span> Namespace<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;http://www.adobe.com/2008/actionscript/Flash10/&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">var</span> minZ: <span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">0</span>;
<span style="color: #000000; font-weight: bold;">var</span> maxZ: <span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">1000</span>;
<span style="color: #000000; font-weight: bold;">var</span> zStep: <span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">10</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> enterFrame<span style="color: #66cc66;">&#40;</span>aEvent: Event<span style="color: #66cc66;">&#41;</span>: <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	logo.<span style="color: #006600;">ns</span>::rotationY += <span style="color: #cc66cc;">1</span>;
	logo.<span style="color: #006600;">ns</span>::rotationZ += <span style="color: #cc66cc;">1</span>;
	logo.<span style="color: #006600;">ns</span>::z += zStep;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>logo.<span style="color: #006600;">ns</span>::z <span style="color: #66cc66;">&amp;</span>lt; minZ <span style="color: #66cc66;">||</span> logo.<span style="color: #006600;">ns</span>::z <span style="color: #66cc66;">&amp;</span>gt; maxZ<span style="color: #66cc66;">&#41;</span>
		zStep = -zStep;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ENTER_FRAME</span>, enterFrame<span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>You can see this sample on-line <a href="http://tengerstudio.com/public/flash10/3d_test1">here</a>. Don&#8217;t forget to install Flash Playar 10 to see it in action.</p>
<p>The API documentation of the new player is not available at the moment, so discovering the new features is a must <img src='http://blog.tengerstudio.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tengerstudio.com/2008/05/16/flash-player-10-beta-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
