<?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>Flash User &#187; ActionScript 3.0</title>
	<atom:link href="http://www.flashuser.net/category/flash-actionscript-as3/feed" rel="self" type="application/rss+xml" />
	<link>http://www.flashuser.net</link>
	<description>FlashUser.net helps creative Flash developers and designers from all over the world to save time and money for their projects. By following our posts you will easily create more effective Flash designs or add value to your Flash software and applications</description>
	<lastBuildDate>Wed, 23 Jun 2010 11:16:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Using Caurina Tweener Class AS3</title>
		<link>http://www.flashuser.net/flash-actionscript-as3/using-caurina-tweener-class-as3.html</link>
		<comments>http://www.flashuser.net/flash-actionscript-as3/using-caurina-tweener-class-as3.html#comments</comments>
		<pubDate>Mon, 26 Oct 2009 16:52:16 +0000</pubDate>
		<dc:creator>flashuser</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flash Tutorials]]></category>
		<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[transitions]]></category>
		<category><![CDATA[tweener]]></category>

		<guid isPermaLink="false">http://www.flashuser.net/?p=2728</guid>
		<description><![CDATA[<p>I enjoy to use in my flash projects the caurina tweener class, because it&#8217;s simple, elegant and flexible. You can use multiple properties in one transition without having problems, create complex animations with a few lines of code. If you&#8217;ll use the caurina tween you&#8217;ll have a better performance on the transitions relative to the built-in Adobe Flash transitions.</p>
<p>I&#8217;ll explain to you how the Actionscript 3 Tweener works, illustrating that with examples.</p>
<p><span id="more-2728"></span>Visit the <span  id="writer-content"><a href="http://code.google.com/p/tweener/" target="_blank">official page</a></span> of the project if you want to know more.</p>
<p>First of all download the latest version of the tweener. The download section (<em>&#8220;Featured downloades&#8221;</em>) is on the right side of the site.</p>
<p><strong>Important:</strong> The <em>caurina</em> folder must be in the same directory as your Flash project.</p>
<p>This line of code will import the caurina tweener class:</p>
<pre class="brush: as3;">
import caurina.transitions.Tweener;
</pre>
<p>Lets see how the code for a basic transition look like:</p>
<pre class="brush: as3;">
Tweener.addTween(circle, {x:390, time:1, transition:&quot;linear&quot;});
</pre>
<p>where:</p>
<ul id="circle">
<li><strong>circle</strong> &#8211;  is the DisplayObject</li>
<li>first parameter is the circle attribute</li>
<li><strong>time</strong> &#8211;  how long a transition will take in seconds</li>
<li><strong>transition</strong> &#8211; the type of transition to use; to experiment with other transitions have a look at the Transition Cheet Sheets</li>
<li>for other parameters check out the documentation</li>
</ul>
<p><strong>1. Simple Tween:</strong><br />
Move the <em>circle</em> MovieClip instance from the initial position x = 10 to x = 390 in a linear transition.</p>
<pre class="brush: as3;">
import caurina.transitions.Tweener;
circle.x = 10;
Tweener.addTween(circle, {x:390, time:1, transition:&quot;linear&quot;});
</pre>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_tweener1_1327631899"
			class="flashmovie"
			width="450"
			height="200">
	<param name="movie" value="http://www.flashuser.net/flash-files/tutorials/tweener/tweener1.swf" />
	<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/tutorials/tweener/tweener1.swf"
			name="fm_tweener1_1327631899"
			width="450"
			height="200">
		<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p><strong>2. Multiple MovieClip attributes: </strong><br />
Move the <em>circle</em> MovieClip instance from the initial position x = 10 y = 75 and alpha = 0 to x = 350 y = 150 and alpha = 1 in a linear transition.</p>
<pre class="brush: as3;">
import caurina.transitions.Tweener;
circle.x = 10;
circle.y = 75;
circle.alpha = 0;
Tweener.addTween(circle, {x:350, y:150, alpha:1, time:1, transition:&quot;linear&quot;});
</pre>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_tweener2_835187459"
			class="flashmovie"
			width="450"
			height="200">
	<param name="movie" value="http://www.flashuser.net/flash-files/tutorials/tweener/tweener2.swf" />
	<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/tutorials/tweener/tweener2.swf"
			name="fm_tweener2_835187459"
			width="450"
			height="200">
		<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p><strong>3. Two transitions: </strong><br />
The first one will move the circle on the x axis,the second one will change the y axis, different transitions.</p>
<pre class="brush: as3;">
import caurina.transitions.Tweener;
circle.x = 10;
circle.y = 75;
Tweener.addTween(circle, {x:350, time:0.5, transition:&quot;easeInQuart&quot;});
Tweener.addTween(circle, {y:150, time:1, transition:&quot;easeOutBounce&quot;});
</pre>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_tweener3_1729426646"
			class="flashmovie"
			width="450"
			height="200">
	<param name="movie" value="http://www.flashuser.net/flash-files/tutorials/tweener/tweener3.swf" />
	<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/tutorials/tweener/tweener3.swf"
			name="fm_tweener3_1729426646"
			width="450"
			height="200">
		<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p><strong>4. Delay parameter: </strong><br />
After the first transition is finished there will be a 1 seconds delay ( how it&#8217;s calculated: second transition delay &#8211; first transition time ) for the next transition to start.</p>
<pre class="brush: as3;">
import caurina.transitions.Tweener;
circle.x = 10;
circle.y = 75;
Tweener.addTween(circle, {x:350, time:0.5, transition:&quot;easeInQuart&quot;});
Tweener.addTween(circle, {y:150, time:1,transition:&quot;easeOutBounce&quot;, delay:1.5});
</pre>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_tweener4_1304115529"
			class="flashmovie"
			width="450"
			height="200">
	<param name="movie" value="http://www.flashuser.net/flash-files/tutorials/tweener/tweener4.swf" />
	<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/tutorials/tweener/tweener4.swf"
			name="fm_tweener4_1304115529"
			width="450"
			height="200">
		<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p><strong>5. onComplete parameter: </strong><br />
After the transition is finished you can do something else.</p>
<pre class="brush: as3;">
import caurina.transitions.Tweener;
tF.alpha = 0;
circle.x = 10;
circle.y = 75;
Tweener.addTween(circle, {x:350, time:0.5, transition:&quot;easeInQuart&quot;, onComplete:func});

function func() {
	tF.alpha = 1;
}
</pre>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_tweener5_1252172174"
			class="flashmovie"
			width="450"
			height="200">
	<param name="movie" value="http://www.flashuser.net/flash-files/tutorials/tweener/tweener5.swf" />
	<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/tutorials/tweener/tweener5.swf"
			name="fm_tweener5_1252172174"
			width="450"
			height="200">
		<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p><strong>6. onCompleteParams parameter: </strong><br />
If you want your onComplete function to have parameters you can do that using onCompleteParams.</p>
<pre class="brush: as3;">
import caurina.transitions.Tweener;
tF.alpha = 0;
	circle.x = 10;
	circle.y = 75;
	Tweener.addTween(circle, {x:350, time:0.5, transition:&quot;easeInQuart&quot;, onComplete:func, onCompleteParams:[&quot;Using onCompleteParams&quot;]});

function func(t:String) {
	tF.txt.text = t;
	tF.alpha = 1;
}
</pre>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_tweener6_659307246"
			class="flashmovie"
			width="450"
			height="200">
	<param name="movie" value="http://www.flashuser.net/flash-files/tutorials/tweener/tweener6.swf" />
	<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/tutorials/tweener/tweener6.swf"
			name="fm_tweener6_659307246"
			width="450"
			height="200">
		<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p><strong>7. Special Properties &#8211; Color: </strong><br />
This special class helps you to apply easy color transformation to your objects.</p>
<pre class="brush: as3;">
import caurina.transitions.Tweener;
import caurina.transitions.properties.ColorShortcuts;
ColorShortcuts.init();

circle.x = 10;
circle.y = 75;
Tweener.addTween(circle, {x:200, _color:0xFF0000, time:1, transition:&quot;easeOutElastic&quot;});
}
</pre>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_tweener7_1854070125"
			class="flashmovie"
			width="450"
			height="200">
	<param name="movie" value="http://www.flashuser.net/flash-files/tutorials/tweener/tweener7.swf" />
	<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/tutorials/tweener/tweener7.swf"
			name="fm_tweener7_1854070125"
			width="450"
			height="200">
		<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p>Experiment with various parameters and you&#8217;ll create amazing animations with just a few lines of code. You can go deep by  using the Special Properties, see the online documentation for more.</p>
<div id="download-file"><a href="http://www.flashuser.net/flash-files/tutorials/tweener/tweener.zip" color="FF0000" target="_blank"><span>Download the source file</span></a></div>
]]></description>
			<content:encoded><![CDATA[<p>I enjoy to use in my flash projects the caurina tweener class, because it&#8217;s simple, elegant and flexible. You can use multiple properties in one transition without having problems, create complex animations with a few lines of code. If you&#8217;ll use the caurina tween you&#8217;ll have a better performance on the transitions relative to the built-in Adobe Flash transitions.</p>
<p>I&#8217;ll explain to you how the Actionscript 3 Tweener works, illustrating that with examples.</p>
<p><span id="more-2728"></span>Visit the <span  id="writer-content"><a href="http://code.google.com/p/tweener/" target="_blank">official page</a></span> of the project if you want to know more.</p>
<p>First of all download the latest version of the tweener. The download section (<em>&#8220;Featured downloades&#8221;</em>) is on the right side of the site.</p>
<p><strong>Important:</strong> The <em>caurina</em> folder must be in the same directory as your Flash project.</p>
<p>This line of code will import the caurina tweener class:</p>
<pre class="brush: as3;">
import caurina.transitions.Tweener;
</pre>
<p>Lets see how the code for a basic transition look like:</p>
<pre class="brush: as3;">
Tweener.addTween(circle, {x:390, time:1, transition:&quot;linear&quot;});
</pre>
<p>where:</p>
<ul id="circle">
<li><strong>circle</strong> &#8211;  is the DisplayObject</li>
<li>first parameter is the circle attribute</li>
<li><strong>time</strong> &#8211;  how long a transition will take in seconds</li>
<li><strong>transition</strong> &#8211; the type of transition to use; to experiment with other transitions have a look at the Transition Cheet Sheets</li>
<li>for other parameters check out the documentation</li>
</ul>
<p><strong>1. Simple Tween:</strong><br />
Move the <em>circle</em> MovieClip instance from the initial position x = 10 to x = 390 in a linear transition.</p>
<pre class="brush: as3;">
import caurina.transitions.Tweener;
circle.x = 10;
Tweener.addTween(circle, {x:390, time:1, transition:&quot;linear&quot;});
</pre>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_tweener1_1728628043"
			class="flashmovie"
			width="450"
			height="200">
	<param name="movie" value="http://www.flashuser.net/flash-files/tutorials/tweener/tweener1.swf" />
	<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/tutorials/tweener/tweener1.swf"
			name="fm_tweener1_1728628043"
			width="450"
			height="200">
		<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p><strong>2. Multiple MovieClip attributes: </strong><br />
Move the <em>circle</em> MovieClip instance from the initial position x = 10 y = 75 and alpha = 0 to x = 350 y = 150 and alpha = 1 in a linear transition.</p>
<pre class="brush: as3;">
import caurina.transitions.Tweener;
circle.x = 10;
circle.y = 75;
circle.alpha = 0;
Tweener.addTween(circle, {x:350, y:150, alpha:1, time:1, transition:&quot;linear&quot;});
</pre>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_tweener2_1137957047"
			class="flashmovie"
			width="450"
			height="200">
	<param name="movie" value="http://www.flashuser.net/flash-files/tutorials/tweener/tweener2.swf" />
	<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/tutorials/tweener/tweener2.swf"
			name="fm_tweener2_1137957047"
			width="450"
			height="200">
		<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p><strong>3. Two transitions: </strong><br />
The first one will move the circle on the x axis,the second one will change the y axis, different transitions.</p>
<pre class="brush: as3;">
import caurina.transitions.Tweener;
circle.x = 10;
circle.y = 75;
Tweener.addTween(circle, {x:350, time:0.5, transition:&quot;easeInQuart&quot;});
Tweener.addTween(circle, {y:150, time:1, transition:&quot;easeOutBounce&quot;});
</pre>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_tweener3_874247464"
			class="flashmovie"
			width="450"
			height="200">
	<param name="movie" value="http://www.flashuser.net/flash-files/tutorials/tweener/tweener3.swf" />
	<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/tutorials/tweener/tweener3.swf"
			name="fm_tweener3_874247464"
			width="450"
			height="200">
		<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p><strong>4. Delay parameter: </strong><br />
After the first transition is finished there will be a 1 seconds delay ( how it&#8217;s calculated: second transition delay &#8211; first transition time ) for the next transition to start.</p>
<pre class="brush: as3;">
import caurina.transitions.Tweener;
circle.x = 10;
circle.y = 75;
Tweener.addTween(circle, {x:350, time:0.5, transition:&quot;easeInQuart&quot;});
Tweener.addTween(circle, {y:150, time:1,transition:&quot;easeOutBounce&quot;, delay:1.5});
</pre>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_tweener4_145397945"
			class="flashmovie"
			width="450"
			height="200">
	<param name="movie" value="http://www.flashuser.net/flash-files/tutorials/tweener/tweener4.swf" />
	<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/tutorials/tweener/tweener4.swf"
			name="fm_tweener4_145397945"
			width="450"
			height="200">
		<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p><strong>5. onComplete parameter: </strong><br />
After the transition is finished you can do something else.</p>
<pre class="brush: as3;">
import caurina.transitions.Tweener;
tF.alpha = 0;
circle.x = 10;
circle.y = 75;
Tweener.addTween(circle, {x:350, time:0.5, transition:&quot;easeInQuart&quot;, onComplete:func});

function func() {
	tF.alpha = 1;
}
</pre>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_tweener5_1835682401"
			class="flashmovie"
			width="450"
			height="200">
	<param name="movie" value="http://www.flashuser.net/flash-files/tutorials/tweener/tweener5.swf" />
	<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/tutorials/tweener/tweener5.swf"
			name="fm_tweener5_1835682401"
			width="450"
			height="200">
		<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p><strong>6. onCompleteParams parameter: </strong><br />
If you want your onComplete function to have parameters you can do that using onCompleteParams.</p>
<pre class="brush: as3;">
import caurina.transitions.Tweener;
tF.alpha = 0;
	circle.x = 10;
	circle.y = 75;
	Tweener.addTween(circle, {x:350, time:0.5, transition:&quot;easeInQuart&quot;, onComplete:func, onCompleteParams:[&quot;Using onCompleteParams&quot;]});

function func(t:String) {
	tF.txt.text = t;
	tF.alpha = 1;
}
</pre>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_tweener6_1584086170"
			class="flashmovie"
			width="450"
			height="200">
	<param name="movie" value="http://www.flashuser.net/flash-files/tutorials/tweener/tweener6.swf" />
	<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/tutorials/tweener/tweener6.swf"
			name="fm_tweener6_1584086170"
			width="450"
			height="200">
		<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p><strong>7. Special Properties &#8211; Color: </strong><br />
This special class helps you to apply easy color transformation to your objects.</p>
<pre class="brush: as3;">
import caurina.transitions.Tweener;
import caurina.transitions.properties.ColorShortcuts;
ColorShortcuts.init();

circle.x = 10;
circle.y = 75;
Tweener.addTween(circle, {x:200, _color:0xFF0000, time:1, transition:&quot;easeOutElastic&quot;});
}
</pre>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_tweener7_47108590"
			class="flashmovie"
			width="450"
			height="200">
	<param name="movie" value="http://www.flashuser.net/flash-files/tutorials/tweener/tweener7.swf" />
	<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/tutorials/tweener/tweener7.swf"
			name="fm_tweener7_47108590"
			width="450"
			height="200">
		<param name="base" value="http://www.flashuser.net/flash-files/tutorials/tweener/" />
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p>Experiment with various parameters and you&#8217;ll create amazing animations with just a few lines of code. You can go deep by  using the Special Properties, see the online documentation for more.</p>
<div id="download-file"><a href="http://www.flashuser.net/flash-files/tutorials/tweener/tweener.zip" color="FF0000" target="_blank"><span>Download the source file</span></a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.flashuser.net/flash-actionscript-as3/using-caurina-tweener-class-as3.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Eyes following mouse cursor AS3</title>
		<link>http://www.flashuser.net/flash-actionscript-as3/eyes-following-mouse-cursor-as3.html</link>
		<comments>http://www.flashuser.net/flash-actionscript-as3/eyes-following-mouse-cursor-as3.html#comments</comments>
		<pubDate>Tue, 22 Sep 2009 20:50:16 +0000</pubDate>
		<dc:creator>flashuser</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flash Tutorials]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[cursor]]></category>
		<category><![CDATA[eyes]]></category>

		<guid isPermaLink="false">http://www.flashuser.net/?p=2322</guid>
		<description><![CDATA[<p>A simple and easy tutorial for you to know how to use the mouse interactivity in Actionscript 3. We&#8217;ll create the eyes for an alien character that will follow the mouse. Also we&#8217;ll hide the mouse and change it with something else. All this is done in a general Movie Clip so you can drag it in your project.</p>
<p><span id="more-2322"></span> Here&#8217;s the final result:</p>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_alien_eyes_follow_298163327"
			class="flashmovie"
			width="550"
			height="300">
	<param name="movie" value="http://www.flashuser.net/flash-files/tutorials/eyes_following_mouse_as3/alien_eyes_follow.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/tutorials/eyes_following_mouse_as3/alien_eyes_follow.swf"
			name="fm_alien_eyes_follow_298163327"
			width="550"
			height="300">
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p><strong>1. </strong>To create an alien eye draw a white circle that will represent the cornea. Convert it to a Movie Clip that has the registration point centered. Inside this clip draw 2 circles that will represent the iris and convert them to a Movie Clip. Position it right over the cornea. Give an instance name of <strong>eye1</strong> for the parent Movie Clip. Drag other two eyes (instance name of <strong>eye2</strong> and <strong>eye3</strong>) and position them on the alien&#8217;s body.</p>
<div align="center" class="border-media">
<img src="http://www.flashuser.net/wp-content/uploads/2009/09/eyes_follow_11.jpg" alt="eyes_follow_1" title="eyes_follow_1" width="309" height="185" class="alignnone size-full wp-image-2334" />
</div>
<p><strong>2. </strong>Now that we have obtained the eye let&#8217;s create the interactivity. The basic idea is that we&#8217;ll have to rotate the eye according to the mouse position. To do so we&#8217;ll calculate the angle from the eye position to the mouse position and rotate it. To obtain the angle we&#8217;ll use the <strong>atan2</strong> function from Flash, that will have as parameters the Y and X position of the mouse.</p>
<div align="center" class="border-media">
<img src="http://www.flashuser.net/wp-content/uploads/2009/09/eyes_follow_2.jpg" alt="eyes_follow_2" title="eyes_follow_2" width="417" height="202" class="alignnone size-full wp-image-2335" />
</div>
<pre class="brush: as3;">
radians1 = Math.atan2(a1, b1);
</pre>
<p><strong>3.</strong> The angle obtained from the<strong> atan2</strong> function is in radians. To convert it in degrees paste this line.</p>
<pre class="brush: as3;">
degrees1 = radians1 / (Math.PI / 180);
</pre>
<p><strong>4.</strong> Now rotate the eye by the angle obtained in degrees.</p>
<pre class="brush: as3;">
eye1.rotation = degrees1;
</pre>
<p><strong>5.</strong> In order to change the mouse with something else use this code:</p>
<pre class="brush: as3;">
        Mouse.hide();
	cookie.x = mouseX;
	cookie.y = mouseY;
</pre>
<p><strong>6.</strong> All code:</p>
<pre class="brush: as3;">
stage.addEventListener(&quot;mouseMove&quot;, eyesFollow);

cookie.visible = false;

function eyesFollow(e:MouseEvent):void {

	var a1 = mouseY - eye1.y;
	var b1 = mouseX - eye1.x;
	var radians1 = Math.atan2(a1,b1);
	var degrees1 = radians1 / (Math.PI / 180);
	eye1.rotation = degrees1;

	var a2 = mouseY - eye2.y;
	var b2 = mouseX - eye2.x;
	var radians2 = Math.atan2(a2,b2);
	var degrees2 = radians2 / (Math.PI / 180);
	eye2.rotation = degrees2;

	var a3 = mouseY - eye3.y;
	var b3 = mouseX - eye3.x;
	var radians3 = Math.atan2(a3,b3);
	var degrees3 = radians3 / (Math.PI / 180);
	eye3.rotation = degrees3;

	Mouse.hide();
	cookie.visible = true;
	cookie.x = mouseX;
	cookie.y = mouseY;
}
</pre>
<div id="download-file"><a href="http://www.flashuser.net/flash-files/tutorials/eyes_following_mouse_as3/alien_eyes_follow.zip" color="FF0000" target="_blank"><span>Download the source file</span></a></div>
]]></description>
			<content:encoded><![CDATA[<p>A simple and easy tutorial for you to know how to use the mouse interactivity in Actionscript 3. We&#8217;ll create the eyes for an alien character that will follow the mouse. Also we&#8217;ll hide the mouse and change it with something else. All this is done in a general Movie Clip so you can drag it in your project.</p>
<p><span id="more-2322"></span> Here&#8217;s the final result:</p>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_alien_eyes_follow_1752477475"
			class="flashmovie"
			width="550"
			height="300">
	<param name="movie" value="http://www.flashuser.net/flash-files/tutorials/eyes_following_mouse_as3/alien_eyes_follow.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/tutorials/eyes_following_mouse_as3/alien_eyes_follow.swf"
			name="fm_alien_eyes_follow_1752477475"
			width="550"
			height="300">
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p><strong>1. </strong>To create an alien eye draw a white circle that will represent the cornea. Convert it to a Movie Clip that has the registration point centered. Inside this clip draw 2 circles that will represent the iris and convert them to a Movie Clip. Position it right over the cornea. Give an instance name of <strong>eye1</strong> for the parent Movie Clip. Drag other two eyes (instance name of <strong>eye2</strong> and <strong>eye3</strong>) and position them on the alien&#8217;s body.</p>
<div align="center" class="border-media">
<img src="http://www.flashuser.net/wp-content/uploads/2009/09/eyes_follow_11.jpg" alt="eyes_follow_1" title="eyes_follow_1" width="309" height="185" class="alignnone size-full wp-image-2334" />
</div>
<p><strong>2. </strong>Now that we have obtained the eye let&#8217;s create the interactivity. The basic idea is that we&#8217;ll have to rotate the eye according to the mouse position. To do so we&#8217;ll calculate the angle from the eye position to the mouse position and rotate it. To obtain the angle we&#8217;ll use the <strong>atan2</strong> function from Flash, that will have as parameters the Y and X position of the mouse.</p>
<div align="center" class="border-media">
<img src="http://www.flashuser.net/wp-content/uploads/2009/09/eyes_follow_2.jpg" alt="eyes_follow_2" title="eyes_follow_2" width="417" height="202" class="alignnone size-full wp-image-2335" />
</div>
<pre class="brush: as3;">
radians1 = Math.atan2(a1, b1);
</pre>
<p><strong>3.</strong> The angle obtained from the<strong> atan2</strong> function is in radians. To convert it in degrees paste this line.</p>
<pre class="brush: as3;">
degrees1 = radians1 / (Math.PI / 180);
</pre>
<p><strong>4.</strong> Now rotate the eye by the angle obtained in degrees.</p>
<pre class="brush: as3;">
eye1.rotation = degrees1;
</pre>
<p><strong>5.</strong> In order to change the mouse with something else use this code:</p>
<pre class="brush: as3;">
        Mouse.hide();
	cookie.x = mouseX;
	cookie.y = mouseY;
</pre>
<p><strong>6.</strong> All code:</p>
<pre class="brush: as3;">
stage.addEventListener(&quot;mouseMove&quot;, eyesFollow);

cookie.visible = false;

function eyesFollow(e:MouseEvent):void {

	var a1 = mouseY - eye1.y;
	var b1 = mouseX - eye1.x;
	var radians1 = Math.atan2(a1,b1);
	var degrees1 = radians1 / (Math.PI / 180);
	eye1.rotation = degrees1;

	var a2 = mouseY - eye2.y;
	var b2 = mouseX - eye2.x;
	var radians2 = Math.atan2(a2,b2);
	var degrees2 = radians2 / (Math.PI / 180);
	eye2.rotation = degrees2;

	var a3 = mouseY - eye3.y;
	var b3 = mouseX - eye3.x;
	var radians3 = Math.atan2(a3,b3);
	var degrees3 = radians3 / (Math.PI / 180);
	eye3.rotation = degrees3;

	Mouse.hide();
	cookie.visible = true;
	cookie.x = mouseX;
	cookie.y = mouseY;
}
</pre>
<div id="download-file"><a href="http://www.flashuser.net/flash-files/tutorials/eyes_following_mouse_as3/alien_eyes_follow.zip" color="FF0000" target="_blank"><span>Download the source file</span></a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.flashuser.net/flash-actionscript-as3/eyes-following-mouse-cursor-as3.html/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Free Flash Template &#8211; Sunset</title>
		<link>http://www.flashuser.net/flash-actionscript-as3/free-flash-template-sunset.html</link>
		<comments>http://www.flashuser.net/flash-actionscript-as3/free-flash-template-sunset.html#comments</comments>
		<pubDate>Sat, 19 Sep 2009 16:32:24 +0000</pubDate>
		<dc:creator>flashuser</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flash Templates]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[flash template]]></category>
		<category><![CDATA[free flash]]></category>

		<guid isPermaLink="false">http://www.flashuser.net/?p=2299</guid>
		<description><![CDATA[<p>We like to keep you up to date with fresh designs and inspiration so for today we posted a free flash template that will save you some quality time in your development. It’s very easy to use, flexible for your needs and has a design that will emphasize your content.</p>
<p><span id="more-2299"></span>It&#8217;s build in ActionScript 3.0.</p>
<div align="center" class="border-media"><a href="http://flashuser.net/flash_templates/04_sunset/" target="_blank"><img src="http://www.flashuser.net/wp-content/uploads/2009/09/flashuser_sunset.jpg" alt="flashuser_sunset" title="flashuser_sunset" width="560" height="388" class="alignnone size-full wp-image-2302" /></a></div>
<p><em><strong>Note: </strong></em>You can download the source code, edit it or not, but we’re not responsible for what you do.  You can&#8217;t sell or redistribute the files you download from Flashuser. You may not republish the content or parts of it without asking permission.</p>
<div id="download-file"><a href="http://flashuser.net/flash_templates/04_sunset/04_flashuser_sunset.zip" target="_blank"><span>Download Source</span></a></div>
]]></description>
			<content:encoded><![CDATA[<p>We like to keep you up to date with fresh designs and inspiration so for today we posted a free flash template that will save you some quality time in your development. It’s very easy to use, flexible for your needs and has a design that will emphasize your content.</p>
<p><span id="more-2299"></span>It&#8217;s build in ActionScript 3.0.</p>
<div align="center" class="border-media"><a href="http://flashuser.net/flash_templates/04_sunset/" target="_blank"><img src="http://www.flashuser.net/wp-content/uploads/2009/09/flashuser_sunset.jpg" alt="flashuser_sunset" title="flashuser_sunset" width="560" height="388" class="alignnone size-full wp-image-2302" /></a></div>
<p><em><strong>Note: </strong></em>You can download the source code, edit it or not, but we’re not responsible for what you do.  You can&#8217;t sell or redistribute the files you download from Flashuser. You may not republish the content or parts of it without asking permission.</p>
<div id="download-file"><a href="http://flashuser.net/flash_templates/04_sunset/04_flashuser_sunset.zip" target="_blank"><span>Download Source</span></a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.flashuser.net/flash-actionscript-as3/free-flash-template-sunset.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Freebie: Scrolling Image Menu</title>
		<link>http://www.flashuser.net/flash-actionscript-as3/freebie-scrolling-image-menu.html</link>
		<comments>http://www.flashuser.net/flash-actionscript-as3/freebie-scrolling-image-menu.html#comments</comments>
		<pubDate>Wed, 16 Sep 2009 14:22:02 +0000</pubDate>
		<dc:creator>flashuser</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Freebies]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[scroll]]></category>

		<guid isPermaLink="false">http://www.flashuser.net/?p=2240</guid>
		<description><![CDATA[<p>This free flash file is a XML driven menu built in ActionSript 3. Each item from the XML file has two attributes: the path to the image and an url address. </p>
<p>You can set the menu to work horizontally or vertically according to your needs. Probably supports unlimited number of images.</p>
<p><span id="more-2240"></span>Use this free flash file as you like and don&#8217;t forget to give us credits for this if you intend to use it.</p>
<p><strong>Horizontal Example:</strong></p>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_scrolling_image_menu_horiz_1396325369"
			class="flashmovie"
			width="500"
			height="110">
	<param name="movie" value="http://www.flashuser.net/flash-files/freebie/scrolling_image_menu/scrolling_image_menu_horiz.swf" />
	<param name="base" value="http://www.flashuser.net/flash-files/freebie/scrolling_image_menu/" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/freebie/scrolling_image_menu/scrolling_image_menu_horiz.swf"
			name="fm_scrolling_image_menu_horiz_1396325369"
			width="500"
			height="110">
		<param name="base" value="http://www.flashuser.net/flash-files/freebie/scrolling_image_menu/" />
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p><strong>Vertical Example:</strong></p>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_scrolling_image_menu_vert_915773330"
			class="flashmovie"
			width="500"
			height="200">
	<param name="movie" value="http://www.flashuser.net/flash-files/freebie/scrolling_image_menu/scrolling_image_menu_vert.swf" />
	<param name="base" value="http://www.flashuser.net/flash-files/freebie/scrolling_image_menu/" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/freebie/scrolling_image_menu/scrolling_image_menu_vert.swf"
			name="fm_scrolling_image_menu_vert_915773330"
			width="500"
			height="200">
		<param name="base" value="http://www.flashuser.net/flash-files/freebie/scrolling_image_menu/" />
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<div id="download-file"><a href="http://www.flashuser.net/flash-files/freebie/scrolling_image_menu/scrolling_image_menu.zip" target="_blank"><span>Download Source</span></a></div>
]]></description>
			<content:encoded><![CDATA[<p>This free flash file is a XML driven menu built in ActionSript 3. Each item from the XML file has two attributes: the path to the image and an url address. </p>
<p>You can set the menu to work horizontally or vertically according to your needs. Probably supports unlimited number of images.</p>
<p><span id="more-2240"></span>Use this free flash file as you like and don&#8217;t forget to give us credits for this if you intend to use it.</p>
<p><strong>Horizontal Example:</strong></p>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_scrolling_image_menu_horiz_878451963"
			class="flashmovie"
			width="500"
			height="110">
	<param name="movie" value="http://www.flashuser.net/flash-files/freebie/scrolling_image_menu/scrolling_image_menu_horiz.swf" />
	<param name="base" value="http://www.flashuser.net/flash-files/freebie/scrolling_image_menu/" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/freebie/scrolling_image_menu/scrolling_image_menu_horiz.swf"
			name="fm_scrolling_image_menu_horiz_878451963"
			width="500"
			height="110">
		<param name="base" value="http://www.flashuser.net/flash-files/freebie/scrolling_image_menu/" />
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p><strong>Vertical Example:</strong></p>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_scrolling_image_menu_vert_425220049"
			class="flashmovie"
			width="500"
			height="200">
	<param name="movie" value="http://www.flashuser.net/flash-files/freebie/scrolling_image_menu/scrolling_image_menu_vert.swf" />
	<param name="base" value="http://www.flashuser.net/flash-files/freebie/scrolling_image_menu/" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/freebie/scrolling_image_menu/scrolling_image_menu_vert.swf"
			name="fm_scrolling_image_menu_vert_425220049"
			width="500"
			height="200">
		<param name="base" value="http://www.flashuser.net/flash-files/freebie/scrolling_image_menu/" />
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<div id="download-file"><a href="http://www.flashuser.net/flash-files/freebie/scrolling_image_menu/scrolling_image_menu.zip" target="_blank"><span>Download Source</span></a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.flashuser.net/flash-actionscript-as3/freebie-scrolling-image-menu.html/feed</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Tutorial: Flash Glow Buttons Menu</title>
		<link>http://www.flashuser.net/flash-actionscript-as3/tutorial-flash-glow-buttons-menu.html</link>
		<comments>http://www.flashuser.net/flash-actionscript-as3/tutorial-flash-glow-buttons-menu.html#comments</comments>
		<pubDate>Thu, 10 Sep 2009 15:12:47 +0000</pubDate>
		<dc:creator>flashuser</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flash Menus]]></category>
		<category><![CDATA[Flash Tutorials]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[glow]]></category>
		<category><![CDATA[menu]]></category>

		<guid isPermaLink="false">http://www.flashuser.net/?p=2077</guid>
		<description><![CDATA[<p>In this tutorial I&#8217;ll show you how to use the glow filter in Actionscript 3. I&#8217;ll create a vertical menu that will have a good looking glow effect for each item. Along with the glow I&#8217;ll add a tween to have a smooth transition. So let&#8217;s begin.</p>
<p><span id="more-2077"></span>Here is what we&#8217;ll end up with:</p>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_glow_buttons_menu_757422286"
			class="flashmovie"
			width="130"
			height="240">
	<param name="movie" value="http://www.flashuser.net/flash-files/tutorials/glow_buttons_menu_as3/glow_buttons_menu.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/tutorials/glow_buttons_menu_as3/glow_buttons_menu.swf"
			name="fm_glow_buttons_menu_757422286"
			width="130"
			height="240">
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p><strong>1. </strong>Open up Flash and create a new ActionScript 3.0 file.</p>
<p><strong>2. </strong>Create a new MovieClip (Insert->New Symbol). I named it <strong>&#8220;about&#8221;</strong>. Draw a rounded rectangle (I put 10 for the roundness) and create a TextField for the button&#8217;s name.(I typed <strong>ABOUT</strong>). Check the image bellow.</p>
<div align="center" class="border-media">
<img src="http://www.flashuser.net/wp-content/uploads/2009/09/glow_1.jpg" alt="glow_1" title="glow_1" width="240" height="112" class="alignnone size-full wp-image-2080" />
</div>
<p><strong>3. </strong> For the other two menu items duplicate the <strong>about</strong> MovieClip(right click on it in the library &#8211; Duplicate). Drag each buttons on the stage, align them and give each an instance name. (<strong>about</strong>, <strong>work</strong>, <strong>contact</strong>)</p>
<p><strong>4. </strong> Open the Actions tab and import this classes.</p>
<pre class="brush: as3;">
import flash.filters.BitmapFilterQuality;
import flash.filters.GlowFilter;
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;
</pre>
<p><strong>5. </strong> We&#8217;ll make each MovieClip to behave like a button. The <strong>aux1</strong> variable is used on the <strong>mouseOverHandler</strong> to know witch item must have the glow effect. Attach for each button the mouse handler functions for rollOver and rollOut.</p>
<pre class="brush: as3;">
var aux1;

about.mouseChildren = false;
about.buttonMode = true;
about.useHandCursor = true;

work.mouseChildren = false;
work.buttonMode = true;
work.useHandCursor = true;

contact.mouseChildren = false;
contact.buttonMode = true;
contact.useHandCursor = true;

about.addEventListener(&quot;mouseOver&quot;, mouseOverHandler);
about.addEventListener(&quot;mouseOut&quot;, mouseOutHandler);
work.addEventListener(&quot;mouseOver&quot;, mouseOverHandler);
work.addEventListener(&quot;mouseOut&quot;, mouseOutHandler);
contact.addEventListener(&quot;mouseOver&quot;, mouseOverHandler);
contact.addEventListener(&quot;mouseOut&quot;, mouseOutHandler);
</pre>
<p><strong>6. </strong>Create the glow filters and attach them for each button.</p>
<pre class="brush: as3;">
var aboutGlow:GlowFilter = new GlowFilter(0xD13083, 1, 2, 2, 2, 3, false, false);
var workGlow:GlowFilter = new GlowFilter(0xD13083, 1, 2, 2, 2, 3, false, false);
var contactGlow:GlowFilter = new GlowFilter(0xD13083, 1, 2, 2, 2, 3, false, false);

var aboutGlowX:Tween = new Tween(aboutGlow, &quot;blurX&quot;, Regular.easeOut, 2, 2, 1, true);
var aboutGlowY:Tween = new Tween(aboutGlow, &quot;blurY&quot;, Regular.easeOut, 2, 2, 1, true);
var workGlowX:Tween = new Tween(workGlow, &quot;blurX&quot;, Regular.easeOut, 2, 2, 1, true);
var workGlowY:Tween = new Tween(workGlow, &quot;blurY&quot;, Regular.easeOut, 2, 2, 1, true);
var contactGlowX:Tween = new Tween(contactGlow, &quot;blurX&quot;, Regular.easeOut, 2, 2, 1, true);
var contactGlowY:Tween = new Tween(contactGlow, &quot;blurY&quot;, Regular.easeOut, 2, 2, 1, true);

aboutGlowX.addEventListener(&quot;motionChange&quot;, aboutFunc);
workGlowX.addEventListener(&quot;motionChange&quot;, workFunc);
contactGlowX.addEventListener(&quot;motionChange&quot;, contactFunc);

function aboutFunc(e:TweenEvent) {
	about.filters = [aboutGlow];
}
function workFunc(e:TweenEvent) {
	work.filters = [workGlow];
}
function contactFunc(e:TweenEvent) {
	contact.filters = [contactGlow];
}
</pre>
<p><strong>7. </strong>The mouse handler functions for rollOver and rollOut.</p>
<pre class="brush: as3;">
function mouseOverHandler(e:MouseEvent):void {
	aux1 = e.target.name;
	switch (aux1) {
		case &quot;about&quot; :
			{
				aboutGlowX.continueTo(10, 0.5);
				aboutGlowY.continueTo(10, 0.5);
				break;

			};
		case &quot;work&quot; :
			{
				workGlowX.continueTo(10, 0.5);
				workGlowY.continueTo(10, 0.5);
				break;

			};
		case &quot;contact&quot; :
			{
				contactGlowX.continueTo(10,  0.5);
				contactGlowY.continueTo(10,  0.5);
				break;

		}
	}
};
function mouseOutHandler(e:MouseEvent):void {
	aboutGlowX.continueTo(2, 1);
	aboutGlowY.continueTo(2, 1);
	workGlowX.continueTo(2, 1);
	workGlowY.continueTo(2, 1);
	contactGlowX.continueTo(2, 1);
	contactGlowY.continueTo(2, 1);

}
</pre>
<p><strong>8. </strong>All code:</p>
<pre class="brush: as3;">
import flash.filters.BitmapFilterQuality;
import flash.filters.GlowFilter;
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;

var aux1;

about.mouseChildren = false;
about.buttonMode = true;
about.useHandCursor = true;

work.mouseChildren = false;
work.buttonMode = true;
work.useHandCursor = true;

contact.mouseChildren = false;
contact.buttonMode = true;
contact.useHandCursor = true;

about.addEventListener(&quot;mouseOver&quot;, mouseOverHandler);
about.addEventListener(&quot;mouseOut&quot;, mouseOutHandler);
work.addEventListener(&quot;mouseOver&quot;, mouseOverHandler);
work.addEventListener(&quot;mouseOut&quot;, mouseOutHandler);
contact.addEventListener(&quot;mouseOver&quot;, mouseOverHandler);
contact.addEventListener(&quot;mouseOut&quot;, mouseOutHandler);

var aboutGlow:GlowFilter = new GlowFilter(0xD13083, 1, 2, 2, 2, 3, false, false);
var workGlow:GlowFilter = new GlowFilter(0xD13083, 1, 2, 2, 2, 3, false, false);
var contactGlow:GlowFilter = new GlowFilter(0xD13083, 1, 2, 2, 2, 3, false, false);

var aboutGlowX:Tween = new Tween(aboutGlow, &quot;blurX&quot;, Regular.easeOut, 2, 2, 1, true);
var aboutGlowY:Tween = new Tween(aboutGlow, &quot;blurY&quot;, Regular.easeOut, 2, 2, 1, true);
var workGlowX:Tween = new Tween(workGlow, &quot;blurX&quot;, Regular.easeOut, 2, 2, 1, true);
var workGlowY:Tween = new Tween(workGlow, &quot;blurY&quot;, Regular.easeOut, 2, 2, 1, true);
var contactGlowX:Tween = new Tween(contactGlow, &quot;blurX&quot;, Regular.easeOut, 2, 2, 1, true);
var contactGlowY:Tween = new Tween(contactGlow, &quot;blurY&quot;, Regular.easeOut, 2, 2, 1, true);

aboutGlowX.addEventListener(&quot;motionChange&quot;, aboutFunc);
workGlowX.addEventListener(&quot;motionChange&quot;, workFunc);
contactGlowX.addEventListener(&quot;motionChange&quot;, contactFunc);

function aboutFunc(e:TweenEvent) {
	about.filters = [aboutGlow];
}
function workFunc(e:TweenEvent) {
	work.filters = [workGlow];
}
function contactFunc(e:TweenEvent) {
	contact.filters = [contactGlow];
}
function mouseOverHandler(e:MouseEvent):void {
	aux1 = e.target.name;
	switch (aux1) {
		case &quot;about&quot; :
			{
				aboutGlowX.continueTo(10, 0.5);
				aboutGlowY.continueTo(10, 0.5);
				break;

			};
		case &quot;work&quot; :
			{
				workGlowX.continueTo(10, 0.5);
				workGlowY.continueTo(10, 0.5);
				break;

			};
		case &quot;contact&quot; :
			{
				contactGlowX.continueTo(10,  0.5);
				contactGlowY.continueTo(10,  0.5);
				break;

		}
	}
};
function mouseOutHandler(e:MouseEvent):void {
	aboutGlowX.continueTo(2, 1);
	aboutGlowY.continueTo(2, 1);
	workGlowX.continueTo(2, 1);
	workGlowY.continueTo(2, 1);
	contactGlowX.continueTo(2, 1);
	contactGlowY.continueTo(2, 1);

}
</pre>
<div id="download-file"><a href="http://www.flashuser.net/flash-files/tutorials/glow_buttons_menu_as3/glow_buttons_menu.zip" color="FF0000" target="_blank"><span>Download the source file</span></a></div>
]]></description>
			<content:encoded><![CDATA[<p>In this tutorial I&#8217;ll show you how to use the glow filter in Actionscript 3. I&#8217;ll create a vertical menu that will have a good looking glow effect for each item. Along with the glow I&#8217;ll add a tween to have a smooth transition. So let&#8217;s begin.</p>
<p><span id="more-2077"></span>Here is what we&#8217;ll end up with:</p>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_glow_buttons_menu_105930943"
			class="flashmovie"
			width="130"
			height="240">
	<param name="movie" value="http://www.flashuser.net/flash-files/tutorials/glow_buttons_menu_as3/glow_buttons_menu.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/tutorials/glow_buttons_menu_as3/glow_buttons_menu.swf"
			name="fm_glow_buttons_menu_105930943"
			width="130"
			height="240">
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p><strong>1. </strong>Open up Flash and create a new ActionScript 3.0 file.</p>
<p><strong>2. </strong>Create a new MovieClip (Insert->New Symbol). I named it <strong>&#8220;about&#8221;</strong>. Draw a rounded rectangle (I put 10 for the roundness) and create a TextField for the button&#8217;s name.(I typed <strong>ABOUT</strong>). Check the image bellow.</p>
<div align="center" class="border-media">
<img src="http://www.flashuser.net/wp-content/uploads/2009/09/glow_1.jpg" alt="glow_1" title="glow_1" width="240" height="112" class="alignnone size-full wp-image-2080" />
</div>
<p><strong>3. </strong> For the other two menu items duplicate the <strong>about</strong> MovieClip(right click on it in the library &#8211; Duplicate). Drag each buttons on the stage, align them and give each an instance name. (<strong>about</strong>, <strong>work</strong>, <strong>contact</strong>)</p>
<p><strong>4. </strong> Open the Actions tab and import this classes.</p>
<pre class="brush: as3;">
import flash.filters.BitmapFilterQuality;
import flash.filters.GlowFilter;
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;
</pre>
<p><strong>5. </strong> We&#8217;ll make each MovieClip to behave like a button. The <strong>aux1</strong> variable is used on the <strong>mouseOverHandler</strong> to know witch item must have the glow effect. Attach for each button the mouse handler functions for rollOver and rollOut.</p>
<pre class="brush: as3;">
var aux1;

about.mouseChildren = false;
about.buttonMode = true;
about.useHandCursor = true;

work.mouseChildren = false;
work.buttonMode = true;
work.useHandCursor = true;

contact.mouseChildren = false;
contact.buttonMode = true;
contact.useHandCursor = true;

about.addEventListener(&quot;mouseOver&quot;, mouseOverHandler);
about.addEventListener(&quot;mouseOut&quot;, mouseOutHandler);
work.addEventListener(&quot;mouseOver&quot;, mouseOverHandler);
work.addEventListener(&quot;mouseOut&quot;, mouseOutHandler);
contact.addEventListener(&quot;mouseOver&quot;, mouseOverHandler);
contact.addEventListener(&quot;mouseOut&quot;, mouseOutHandler);
</pre>
<p><strong>6. </strong>Create the glow filters and attach them for each button.</p>
<pre class="brush: as3;">
var aboutGlow:GlowFilter = new GlowFilter(0xD13083, 1, 2, 2, 2, 3, false, false);
var workGlow:GlowFilter = new GlowFilter(0xD13083, 1, 2, 2, 2, 3, false, false);
var contactGlow:GlowFilter = new GlowFilter(0xD13083, 1, 2, 2, 2, 3, false, false);

var aboutGlowX:Tween = new Tween(aboutGlow, &quot;blurX&quot;, Regular.easeOut, 2, 2, 1, true);
var aboutGlowY:Tween = new Tween(aboutGlow, &quot;blurY&quot;, Regular.easeOut, 2, 2, 1, true);
var workGlowX:Tween = new Tween(workGlow, &quot;blurX&quot;, Regular.easeOut, 2, 2, 1, true);
var workGlowY:Tween = new Tween(workGlow, &quot;blurY&quot;, Regular.easeOut, 2, 2, 1, true);
var contactGlowX:Tween = new Tween(contactGlow, &quot;blurX&quot;, Regular.easeOut, 2, 2, 1, true);
var contactGlowY:Tween = new Tween(contactGlow, &quot;blurY&quot;, Regular.easeOut, 2, 2, 1, true);

aboutGlowX.addEventListener(&quot;motionChange&quot;, aboutFunc);
workGlowX.addEventListener(&quot;motionChange&quot;, workFunc);
contactGlowX.addEventListener(&quot;motionChange&quot;, contactFunc);

function aboutFunc(e:TweenEvent) {
	about.filters = [aboutGlow];
}
function workFunc(e:TweenEvent) {
	work.filters = [workGlow];
}
function contactFunc(e:TweenEvent) {
	contact.filters = [contactGlow];
}
</pre>
<p><strong>7. </strong>The mouse handler functions for rollOver and rollOut.</p>
<pre class="brush: as3;">
function mouseOverHandler(e:MouseEvent):void {
	aux1 = e.target.name;
	switch (aux1) {
		case &quot;about&quot; :
			{
				aboutGlowX.continueTo(10, 0.5);
				aboutGlowY.continueTo(10, 0.5);
				break;

			};
		case &quot;work&quot; :
			{
				workGlowX.continueTo(10, 0.5);
				workGlowY.continueTo(10, 0.5);
				break;

			};
		case &quot;contact&quot; :
			{
				contactGlowX.continueTo(10,  0.5);
				contactGlowY.continueTo(10,  0.5);
				break;

		}
	}
};
function mouseOutHandler(e:MouseEvent):void {
	aboutGlowX.continueTo(2, 1);
	aboutGlowY.continueTo(2, 1);
	workGlowX.continueTo(2, 1);
	workGlowY.continueTo(2, 1);
	contactGlowX.continueTo(2, 1);
	contactGlowY.continueTo(2, 1);

}
</pre>
<p><strong>8. </strong>All code:</p>
<pre class="brush: as3;">
import flash.filters.BitmapFilterQuality;
import flash.filters.GlowFilter;
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;

var aux1;

about.mouseChildren = false;
about.buttonMode = true;
about.useHandCursor = true;

work.mouseChildren = false;
work.buttonMode = true;
work.useHandCursor = true;

contact.mouseChildren = false;
contact.buttonMode = true;
contact.useHandCursor = true;

about.addEventListener(&quot;mouseOver&quot;, mouseOverHandler);
about.addEventListener(&quot;mouseOut&quot;, mouseOutHandler);
work.addEventListener(&quot;mouseOver&quot;, mouseOverHandler);
work.addEventListener(&quot;mouseOut&quot;, mouseOutHandler);
contact.addEventListener(&quot;mouseOver&quot;, mouseOverHandler);
contact.addEventListener(&quot;mouseOut&quot;, mouseOutHandler);

var aboutGlow:GlowFilter = new GlowFilter(0xD13083, 1, 2, 2, 2, 3, false, false);
var workGlow:GlowFilter = new GlowFilter(0xD13083, 1, 2, 2, 2, 3, false, false);
var contactGlow:GlowFilter = new GlowFilter(0xD13083, 1, 2, 2, 2, 3, false, false);

var aboutGlowX:Tween = new Tween(aboutGlow, &quot;blurX&quot;, Regular.easeOut, 2, 2, 1, true);
var aboutGlowY:Tween = new Tween(aboutGlow, &quot;blurY&quot;, Regular.easeOut, 2, 2, 1, true);
var workGlowX:Tween = new Tween(workGlow, &quot;blurX&quot;, Regular.easeOut, 2, 2, 1, true);
var workGlowY:Tween = new Tween(workGlow, &quot;blurY&quot;, Regular.easeOut, 2, 2, 1, true);
var contactGlowX:Tween = new Tween(contactGlow, &quot;blurX&quot;, Regular.easeOut, 2, 2, 1, true);
var contactGlowY:Tween = new Tween(contactGlow, &quot;blurY&quot;, Regular.easeOut, 2, 2, 1, true);

aboutGlowX.addEventListener(&quot;motionChange&quot;, aboutFunc);
workGlowX.addEventListener(&quot;motionChange&quot;, workFunc);
contactGlowX.addEventListener(&quot;motionChange&quot;, contactFunc);

function aboutFunc(e:TweenEvent) {
	about.filters = [aboutGlow];
}
function workFunc(e:TweenEvent) {
	work.filters = [workGlow];
}
function contactFunc(e:TweenEvent) {
	contact.filters = [contactGlow];
}
function mouseOverHandler(e:MouseEvent):void {
	aux1 = e.target.name;
	switch (aux1) {
		case &quot;about&quot; :
			{
				aboutGlowX.continueTo(10, 0.5);
				aboutGlowY.continueTo(10, 0.5);
				break;

			};
		case &quot;work&quot; :
			{
				workGlowX.continueTo(10, 0.5);
				workGlowY.continueTo(10, 0.5);
				break;

			};
		case &quot;contact&quot; :
			{
				contactGlowX.continueTo(10,  0.5);
				contactGlowY.continueTo(10,  0.5);
				break;

		}
	}
};
function mouseOutHandler(e:MouseEvent):void {
	aboutGlowX.continueTo(2, 1);
	aboutGlowY.continueTo(2, 1);
	workGlowX.continueTo(2, 1);
	workGlowY.continueTo(2, 1);
	contactGlowX.continueTo(2, 1);
	contactGlowY.continueTo(2, 1);

}
</pre>
<div id="download-file"><a href="http://www.flashuser.net/flash-files/tutorials/glow_buttons_menu_as3/glow_buttons_menu.zip" color="FF0000" target="_blank"><span>Download the source file</span></a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.flashuser.net/flash-actionscript-as3/tutorial-flash-glow-buttons-menu.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Build an image slideshow in Flash</title>
		<link>http://www.flashuser.net/flash-actionscript-as3/build-an-image-slideshow-in-flash.html</link>
		<comments>http://www.flashuser.net/flash-actionscript-as3/build-an-image-slideshow-in-flash.html#comments</comments>
		<pubDate>Tue, 01 Sep 2009 22:03:44 +0000</pubDate>
		<dc:creator>flashuser</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flash Tutorials]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[banner rotator]]></category>
		<category><![CDATA[flash tutorial]]></category>

		<guid isPermaLink="false">http://www.flashuser.net/?p=1888</guid>
		<description><![CDATA[<p>In this tutorial I will describe how to create an image sliding in Actionscript 3.0. For creating the transition we&#8217;ll use the standard Tween from Flash. You can use this in your projects, product presentation, anywhere you need such a tool.</p>
<p><span id="more-1888"></span>The images used in this tutorial were taken from flickr user <span  id="writer-content"><a href="http://www.flickr.com/photos/mundilfari_gjk" target="_blank">mundilfari_gjk</a></span></p>
<p>The end result (rollover the image for the navigation buttons to appear):</p>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_flash_image_slideshow_753192440"
			class="flashmovie"
			width="500"
			height="250">
	<param name="movie" value="http://www.flashuser.net/flash-files/tutorials/image_slideshow_as3/flash_image_slideshow.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/tutorials/image_slideshow_as3/flash_image_slideshow.swf"
			name="fm_flash_image_slideshow_753192440"
			width="500"
			height="250">
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p><strong>1.</strong> Create a new Flash AS3 file (500 x 250) with a frame rate of 30 fps and 3 layers inside of it.</p>
<div align="center" class="border-media"><img src="http://www.flashuser.net/wp-content/uploads/2009/09/flash_slideshow_1.jpg" alt="flash_slideshow_1" title="flash_slideshow_1" width="279" height="56" class="alignnone size-full wp-image-1900" /></div>
<p><strong>2.</strong> In the last layer, create an empty Movie Clip with the registration point in the top left corner (Insert ->New Symbol). Place the images side by side in the Movie Clip together with the text name and description in front of each picture. Give it an instance name of <strong>mc</strong>.</p>
<div align="center" class="border-media"><img src="http://www.flashuser.net/wp-content/uploads/2009/09/flash_slideshow_3.jpg" alt="flash_slideshow_3" title="flash_slideshow_3" width="560" height="89" class="alignnone size-full wp-image-1921" /></div>
<p><strong>3.</strong> Select the buttons layer from the timeline and draw a 30&#215;30 rectangle and two lines for the button arrow. Center align and convert them to a Movie Clip(right click &#8211; Convert to Symbol). Give an instance name of <strong>button_left</strong>. Duplicate this and inside of it change the arrow shape to point in the right direction and give an instance name of <strong>button_right</strong>.</p>
<div align="center" class="border-media"><img src="http://www.flashuser.net/wp-content/uploads/2009/09/flash_slideshow_2.jpg" alt="flash_slideshow_2" title="flash_slideshow_2" width="211" height="135" class="alignnone size-full wp-image-1904" /></div>
<p><strong>4.</strong> In the <strong>as</strong> layer open the Actions tab. Import the transition classes for tweening. Declare variables for the image to play, total images and an array with the X coordinate of each image.</p>
<pre class="brush: as3;">
import fl.transitions.easing.*;
import fl.transitions.*;

//know what image to play
var count :Number = 0;

//an array with the images  x - coordinate
var imagePos :Array = [0,-500,-1000,-1500,-2000];

var imgLength = imagePos.length-1;
</pre>
<p><strong>5.</strong> Create the buttons and the functions for them to appear or disapper according to the mouse move.</p>
<pre class="brush: as3;">
//left button
button_left.buttonMode = true;
button_left.useHandCursor = true;
button_left.mouseChildren = false;
button_left.addEventListener(&quot;mouseDown&quot;,buttonLeftPress);
button_left.visible = false;

//right button
button_right.buttonMode = true;
button_right.useHandCursor = true;
button_right.mouseChildren = false;
button_right.addEventListener(&quot;mouseDown&quot;,buttonRightPress);
button_right.visible = false;

//functions for buttons to appear or disapper according to the mouse move
stage.addEventListener(&quot;mouseMove&quot;, getPosition);
stage.addEventListener( Event.MOUSE_LEAVE,leftStage );

function leftStage(e:Event) {
	button_left.visible = false;
	button_right.visible = false;
}
function getPosition(e:MouseEvent) {
	if (mouseX &lt; stage.stageWidth/2) {
		button_left.visible = true;
		button_right.visible = false;
	} else {
		button_left.visible = false;
		button_right.visible = true;
	}

}
</pre>
<p><strong>6.</strong> Create the functions for the images transition when you click the left or the right button.</p>
<pre class="brush: as3;">
//left button press
function buttonLeftPress(e:MouseEvent) {
	count--;
	if (count &lt;0) {
		count = imgLength;
	}
	new Tween(mc,&quot;x&quot;,Regular.easeOut,mc.x,imagePos[count],1,true);
}
//right button press
function buttonRightPress(e:MouseEvent) {
	count++;
	if (count &gt;imgLength) {
		count = 0;
	}

	new Tween(mc,&quot;x&quot;,Regular.easeOut,mc.x,imagePos[count],1,true);
}
</pre>
<div id="download-file"><a href="http://flashuser.net/flash-files/tutorials/image_slideshow_as3/flash_image_slideshow.zip" target="_blank"><span>Download Source</span></a></div>
]]></description>
			<content:encoded><![CDATA[<p>In this tutorial I will describe how to create an image sliding in Actionscript 3.0. For creating the transition we&#8217;ll use the standard Tween from Flash. You can use this in your projects, product presentation, anywhere you need such a tool.</p>
<p><span id="more-1888"></span>The images used in this tutorial were taken from flickr user <span  id="writer-content"><a href="http://www.flickr.com/photos/mundilfari_gjk" target="_blank">mundilfari_gjk</a></span></p>
<p>The end result (rollover the image for the navigation buttons to appear):</p>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_flash_image_slideshow_1978962823"
			class="flashmovie"
			width="500"
			height="250">
	<param name="movie" value="http://www.flashuser.net/flash-files/tutorials/image_slideshow_as3/flash_image_slideshow.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/tutorials/image_slideshow_as3/flash_image_slideshow.swf"
			name="fm_flash_image_slideshow_1978962823"
			width="500"
			height="250">
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p><strong>1.</strong> Create a new Flash AS3 file (500 x 250) with a frame rate of 30 fps and 3 layers inside of it.</p>
<div align="center" class="border-media"><img src="http://www.flashuser.net/wp-content/uploads/2009/09/flash_slideshow_1.jpg" alt="flash_slideshow_1" title="flash_slideshow_1" width="279" height="56" class="alignnone size-full wp-image-1900" /></div>
<p><strong>2.</strong> In the last layer, create an empty Movie Clip with the registration point in the top left corner (Insert ->New Symbol). Place the images side by side in the Movie Clip together with the text name and description in front of each picture. Give it an instance name of <strong>mc</strong>.</p>
<div align="center" class="border-media"><img src="http://www.flashuser.net/wp-content/uploads/2009/09/flash_slideshow_3.jpg" alt="flash_slideshow_3" title="flash_slideshow_3" width="560" height="89" class="alignnone size-full wp-image-1921" /></div>
<p><strong>3.</strong> Select the buttons layer from the timeline and draw a 30&#215;30 rectangle and two lines for the button arrow. Center align and convert them to a Movie Clip(right click &#8211; Convert to Symbol). Give an instance name of <strong>button_left</strong>. Duplicate this and inside of it change the arrow shape to point in the right direction and give an instance name of <strong>button_right</strong>.</p>
<div align="center" class="border-media"><img src="http://www.flashuser.net/wp-content/uploads/2009/09/flash_slideshow_2.jpg" alt="flash_slideshow_2" title="flash_slideshow_2" width="211" height="135" class="alignnone size-full wp-image-1904" /></div>
<p><strong>4.</strong> In the <strong>as</strong> layer open the Actions tab. Import the transition classes for tweening. Declare variables for the image to play, total images and an array with the X coordinate of each image.</p>
<pre class="brush: as3;">
import fl.transitions.easing.*;
import fl.transitions.*;

//know what image to play
var count :Number = 0;

//an array with the images  x - coordinate
var imagePos :Array = [0,-500,-1000,-1500,-2000];

var imgLength = imagePos.length-1;
</pre>
<p><strong>5.</strong> Create the buttons and the functions for them to appear or disapper according to the mouse move.</p>
<pre class="brush: as3;">
//left button
button_left.buttonMode = true;
button_left.useHandCursor = true;
button_left.mouseChildren = false;
button_left.addEventListener(&quot;mouseDown&quot;,buttonLeftPress);
button_left.visible = false;

//right button
button_right.buttonMode = true;
button_right.useHandCursor = true;
button_right.mouseChildren = false;
button_right.addEventListener(&quot;mouseDown&quot;,buttonRightPress);
button_right.visible = false;

//functions for buttons to appear or disapper according to the mouse move
stage.addEventListener(&quot;mouseMove&quot;, getPosition);
stage.addEventListener( Event.MOUSE_LEAVE,leftStage );

function leftStage(e:Event) {
	button_left.visible = false;
	button_right.visible = false;
}
function getPosition(e:MouseEvent) {
	if (mouseX &lt; stage.stageWidth/2) {
		button_left.visible = true;
		button_right.visible = false;
	} else {
		button_left.visible = false;
		button_right.visible = true;
	}

}
</pre>
<p><strong>6.</strong> Create the functions for the images transition when you click the left or the right button.</p>
<pre class="brush: as3;">
//left button press
function buttonLeftPress(e:MouseEvent) {
	count--;
	if (count &lt;0) {
		count = imgLength;
	}
	new Tween(mc,&quot;x&quot;,Regular.easeOut,mc.x,imagePos[count],1,true);
}
//right button press
function buttonRightPress(e:MouseEvent) {
	count++;
	if (count &gt;imgLength) {
		count = 0;
	}

	new Tween(mc,&quot;x&quot;,Regular.easeOut,mc.x,imagePos[count],1,true);
}
</pre>
<div id="download-file"><a href="http://flashuser.net/flash-files/tutorials/image_slideshow_as3/flash_image_slideshow.zip" target="_blank"><span>Download Source</span></a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.flashuser.net/flash-actionscript-as3/build-an-image-slideshow-in-flash.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Tips &amp; Tricks 11: Customizable Flash Analogue Clock AS3</title>
		<link>http://www.flashuser.net/flash-tricks/tips-tricks-11-customizable-flash-analogue-clock-as3.html</link>
		<comments>http://www.flashuser.net/flash-tricks/tips-tricks-11-customizable-flash-analogue-clock-as3.html#comments</comments>
		<pubDate>Fri, 28 Aug 2009 12:46:56 +0000</pubDate>
		<dc:creator>flashuser</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flash Tips & Tricks]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[clock]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://www.flashuser.net/?p=1796</guid>
		<description><![CDATA[<p>In this tutorial I&#8217;ll create a customizable analogue clock in ActionScript 3.0. What is a must know is that the time displayed depends on the users computer time. The code beyond is intuitive so the focus here is on the design. Follow this three simple steps to create your one clock. </p>
<p><span id="more-1796"></span>Take a look at the example below for the final result.</p>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_analogue_clock_537491217"
			class="flashmovie"
			width="320"
			height="320">
	<param name="movie" value="http://www.flashuser.net/flash-files/tutorials/analogue_clock_as3/analogue_clock.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/tutorials/analogue_clock_as3/analogue_clock.swf"
			name="fm_analogue_clock_537491217"
			width="320"
			height="320">
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p><strong>1. </strong>For the first step I created the clock face. I drew 3 circles, and center align them. I used blue and grey colors with gradients for the background clock to look nice. I also made here the lines for the minutes and hours.</p>
<p><strong>2. </strong> Create three new movie clips (Insert->New Symbol->Movie Clip) for seconds, minutes and hours clock hands. Inside each of them drew a coresponding shape. After that drag them on the Stage and center align to the clock. Give each Movie Clip an instance name (<strong>secondHand_</strong>, <strong>minuteHand_</strong>, <strong>hourHand_</strong>).</p>
<p><strong>3. </strong> Final step paste this code in the Actions tab of the first frame. Once you&#8217;ve done that test the movie.</p>
<pre class="brush: as3;">
var timer:Timer = new Timer(1000);
timer.addEventListener(TimerEvent.TIMER, clockHandler);
timer.start();

function clockHandler(event:TimerEvent)
{

	    // set hour
		var time = new Date();
		var hourHand = time.getHours();
		var minuteHand = time.getMinutes();
		var secondHand = time.getSeconds();

		hourHand_.rotation = 30 * hourHand + minuteHand / 2;
		minuteHand_.rotation = 6 * minuteHand;
		secondHand_.rotation = 6 * secondHand;
}
</pre>
<div id="download-file"><a href="http://www.flashuser.net/flash-files/tutorials/analogue_clock_as3/analogue_clock.zip" color="FF0000" target="_blank"><span>Download Source</span></a></div>
]]></description>
			<content:encoded><![CDATA[<p>In this tutorial I&#8217;ll create a customizable analogue clock in ActionScript 3.0. What is a must know is that the time displayed depends on the users computer time. The code beyond is intuitive so the focus here is on the design. Follow this three simple steps to create your one clock. </p>
<p><span id="more-1796"></span>Take a look at the example below for the final result.</p>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_analogue_clock_1616465228"
			class="flashmovie"
			width="320"
			height="320">
	<param name="movie" value="http://www.flashuser.net/flash-files/tutorials/analogue_clock_as3/analogue_clock.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/tutorials/analogue_clock_as3/analogue_clock.swf"
			name="fm_analogue_clock_1616465228"
			width="320"
			height="320">
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p><strong>1. </strong>For the first step I created the clock face. I drew 3 circles, and center align them. I used blue and grey colors with gradients for the background clock to look nice. I also made here the lines for the minutes and hours.</p>
<p><strong>2. </strong> Create three new movie clips (Insert->New Symbol->Movie Clip) for seconds, minutes and hours clock hands. Inside each of them drew a coresponding shape. After that drag them on the Stage and center align to the clock. Give each Movie Clip an instance name (<strong>secondHand_</strong>, <strong>minuteHand_</strong>, <strong>hourHand_</strong>).</p>
<p><strong>3. </strong> Final step paste this code in the Actions tab of the first frame. Once you&#8217;ve done that test the movie.</p>
<pre class="brush: as3;">
var timer:Timer = new Timer(1000);
timer.addEventListener(TimerEvent.TIMER, clockHandler);
timer.start();

function clockHandler(event:TimerEvent)
{

	    // set hour
		var time = new Date();
		var hourHand = time.getHours();
		var minuteHand = time.getMinutes();
		var secondHand = time.getSeconds();

		hourHand_.rotation = 30 * hourHand + minuteHand / 2;
		minuteHand_.rotation = 6 * minuteHand;
		secondHand_.rotation = 6 * secondHand;
}
</pre>
<div id="download-file"><a href="http://www.flashuser.net/flash-files/tutorials/analogue_clock_as3/analogue_clock.zip" color="FF0000" target="_blank"><span>Download Source</span></a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.flashuser.net/flash-tricks/tips-tricks-11-customizable-flash-analogue-clock-as3.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Review: HTML / XML Table Renderer</title>
		<link>http://www.flashuser.net/flash-components/review-html-xml-table-renderer.html</link>
		<comments>http://www.flashuser.net/flash-components/review-html-xml-table-renderer.html#comments</comments>
		<pubDate>Thu, 20 Aug 2009 11:03:06 +0000</pubDate>
		<dc:creator>flashuser</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flash Components]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[flash table]]></category>
		<category><![CDATA[table render]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.flashuser.net/?p=1536</guid>
		<description><![CDATA[<p>As a developer you encounter different issues when working on a project. One of them is to create a html replica of a table in Flash. To have features such as column span and row span, cellspacing and padding and many others that allows you to manage your table in Flash like in HTML. </p>
<p><span id="more-1536"></span>I faced a similar situation myself and thought to spare you of precious time to do such a work, by sharing with you a useful source.</p>
<p>It seems that somebody spent his time and managed to create it for us. It’s about the <span id="writer-content"><a href="http://www.flashtuning.net/components/HTML-Table-Renderer-AS-2.0_10.html" target="_blank">Flashtuning HTML Table Renderer</a></span> component that provides an advanced XML/HTML table rendering engine for Flash, complete with CSS support and advanced features such as row and column spans. The component can render all common types of content (text, SWF files, images and Flash library objects) and allows embedding custom fonts and offers advanced text rendering controls. </p>
<div align="center" class="border-media">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_table_renderer_css_1670143396"
			class="flashmovie"
			width="380"
			height="260">
	<param name="movie" value="http://www.flashuser.net/flash-files/reviews/table_renderer/table_renderer_css.swf" />
	<param name="base" value="http://www.flashuser.net/flash-files/reviews/table_renderer/" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/reviews/table_renderer/table_renderer_css.swf"
			name="fm_table_renderer_css_1670143396"
			width="380"
			height="260">
		<param name="base" value="http://www.flashuser.net/flash-files/reviews/table_renderer/" />
	<!--<![endif]-->
		<br />
<!-- Begin Alternate Content --></p>
<p><a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a></p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<h2 id="sub-title">Requirements</h2>
<p>The Table Renderer is available in two versions one for <span id="writer-content"><a href="http://www.flashtuning.net/components/HTML-Table-Renderer-AS-2.0_10.html" target="_blank">Actionscript 2.0</a></span> and the other for <span id="writer-content"><a href="http://www.flashtuning.net/components/HTML-Table-Renderer-AS-3.0_20.html" target="_blank">Actionscript 3.0</a></span>. You choose what is the best for your needs. You can download a <span id="writer-content"><a href="http://www.flashtuning.net/components/HTML-Table-Renderer-AS-2.0_10.html" target="_blank">trial version</a></span> (click on the Free Download link above the examples) that has a limit of 4 X 4 for the tables, as a trial limitation. To get the full version with no restrictions you need to purchase a license for $9.00.</p>
<h2 id="sub-title">Features</h2>
<ul id="circle">
<li> Support for all common HTML tags and attributes and CSS properties supported by Flash</li>
<li> Images/SWF/library objects inclusion into table cells</li>
<li> Easily integrate your own custom actions like roll overs, drag &#038; drop, tool tips</li>
<li> Link to custom ActionScript functions from within the table</li>
<li> Percentage/fixed widths/heights support for the table and/or individual cells</li>
<li> Alpha levels for borders and backgrounds</li>
<li> Font embedding support: you can specify custom library fonts for the table and/or individual cells using the cellfont attribute</li>
<li> Built in Help Book automatically that can be accessed anytime via the Flash Help Panel</li>
</ul>
<h2 id="sub-title">How to use it</h2>
<p>We&#8217;ll set up a simple HTML table in Flash.</p>
<p><strong>1.</strong> Start Adobe Flash and open a new document.</p>
<p><strong>2.</strong> Open the <strong>Components</strong> panel ( Window/Components). You will find the component in the <strong>Flashtuning</strong> folder.</p>
<p><strong>3.</strong> Drag the component (<strong>FtTableRenderer</strong>) from the <strong>Components</strong> panel to the stage. The component graphic symbol should now be displayed on the stage.</p>
<p><strong>4.</strong> Create an XHTML file which includes a table definition using your preffered HTML / Text editor.</p>
<p><strong>5.</strong> Switch back to Adobe Flash, select the component on the stage and configure its parameters in the <strong>Parameters</strong> panel or in the <strong>Component Inspector</strong> panel ( Window/Component Inspector):</p>
<p>Instruct the component to use the newly created table.html file as the<strong> XML/HTML Source File</strong>.</p>
<p><strong>6. </strong>Test the scene (Control/Test Movie).</p>
<p><strong>(!)</strong> Make sure the HTML source is properly formatted (the tags and attributes need to be closed and lowercase) and the cells colspan need to be valid for the table to render correctly.</p>
<h2 id="sub-title">Conclusion</h2>
<p>The possibilities to use such a great component are vast, all you have to do is explore and use your imagination. I think any Flash developer should have it and considering the price I would say it’s a great deal.</p>
]]></description>
			<content:encoded><![CDATA[<p>As a developer you encounter different issues when working on a project. One of them is to create a html replica of a table in Flash. To have features such as column span and row span, cellspacing and padding and many others that allows you to manage your table in Flash like in HTML. </p>
<p><span id="more-1536"></span>I faced a similar situation myself and thought to spare you of precious time to do such a work, by sharing with you a useful source.</p>
<p>It seems that somebody spent his time and managed to create it for us. It’s about the <span id="writer-content"><a href="http://www.flashtuning.net/components/HTML-Table-Renderer-AS-2.0_10.html" target="_blank">Flashtuning HTML Table Renderer</a></span> component that provides an advanced XML/HTML table rendering engine for Flash, complete with CSS support and advanced features such as row and column spans. The component can render all common types of content (text, SWF files, images and Flash library objects) and allows embedding custom fonts and offers advanced text rendering controls. </p>
<div align="center" class="border-media">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_table_renderer_css_1564770711"
			class="flashmovie"
			width="380"
			height="260">
	<param name="movie" value="http://www.flashuser.net/flash-files/reviews/table_renderer/table_renderer_css.swf" />
	<param name="base" value="http://www.flashuser.net/flash-files/reviews/table_renderer/" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/reviews/table_renderer/table_renderer_css.swf"
			name="fm_table_renderer_css_1564770711"
			width="380"
			height="260">
		<param name="base" value="http://www.flashuser.net/flash-files/reviews/table_renderer/" />
	<!--<![endif]-->
		<br />
<!-- Begin Alternate Content --></p>
<p><a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a></p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<h2 id="sub-title">Requirements</h2>
<p>The Table Renderer is available in two versions one for <span id="writer-content"><a href="http://www.flashtuning.net/components/HTML-Table-Renderer-AS-2.0_10.html" target="_blank">Actionscript 2.0</a></span> and the other for <span id="writer-content"><a href="http://www.flashtuning.net/components/HTML-Table-Renderer-AS-3.0_20.html" target="_blank">Actionscript 3.0</a></span>. You choose what is the best for your needs. You can download a <span id="writer-content"><a href="http://www.flashtuning.net/components/HTML-Table-Renderer-AS-2.0_10.html" target="_blank">trial version</a></span> (click on the Free Download link above the examples) that has a limit of 4 X 4 for the tables, as a trial limitation. To get the full version with no restrictions you need to purchase a license for $9.00.</p>
<h2 id="sub-title">Features</h2>
<ul id="circle">
<li> Support for all common HTML tags and attributes and CSS properties supported by Flash</li>
<li> Images/SWF/library objects inclusion into table cells</li>
<li> Easily integrate your own custom actions like roll overs, drag &#038; drop, tool tips</li>
<li> Link to custom ActionScript functions from within the table</li>
<li> Percentage/fixed widths/heights support for the table and/or individual cells</li>
<li> Alpha levels for borders and backgrounds</li>
<li> Font embedding support: you can specify custom library fonts for the table and/or individual cells using the cellfont attribute</li>
<li> Built in Help Book automatically that can be accessed anytime via the Flash Help Panel</li>
</ul>
<h2 id="sub-title">How to use it</h2>
<p>We&#8217;ll set up a simple HTML table in Flash.</p>
<p><strong>1.</strong> Start Adobe Flash and open a new document.</p>
<p><strong>2.</strong> Open the <strong>Components</strong> panel ( Window/Components). You will find the component in the <strong>Flashtuning</strong> folder.</p>
<p><strong>3.</strong> Drag the component (<strong>FtTableRenderer</strong>) from the <strong>Components</strong> panel to the stage. The component graphic symbol should now be displayed on the stage.</p>
<p><strong>4.</strong> Create an XHTML file which includes a table definition using your preffered HTML / Text editor.</p>
<p><strong>5.</strong> Switch back to Adobe Flash, select the component on the stage and configure its parameters in the <strong>Parameters</strong> panel or in the <strong>Component Inspector</strong> panel ( Window/Component Inspector):</p>
<p>Instruct the component to use the newly created table.html file as the<strong> XML/HTML Source File</strong>.</p>
<p><strong>6. </strong>Test the scene (Control/Test Movie).</p>
<p><strong>(!)</strong> Make sure the HTML source is properly formatted (the tags and attributes need to be closed and lowercase) and the cells colspan need to be valid for the table to render correctly.</p>
<h2 id="sub-title">Conclusion</h2>
<p>The possibilities to use such a great component are vast, all you have to do is explore and use your imagination. I think any Flash developer should have it and considering the price I would say it’s a great deal.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashuser.net/flash-components/review-html-xml-table-renderer.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Tips &amp; Tricks 10: Using Drag &amp; Drop in Actionscript 3.0</title>
		<link>http://www.flashuser.net/flash-tricks/tips-tricks-10-using-drag-drop-in-actionscript-3-0.html</link>
		<comments>http://www.flashuser.net/flash-tricks/tips-tricks-10-using-drag-drop-in-actionscript-3-0.html#comments</comments>
		<pubDate>Fri, 07 Aug 2009 18:02:34 +0000</pubDate>
		<dc:creator>flashuser</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flash Tips & Tricks]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[drag&drop]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.flashuser.net/?p=1060</guid>
		<description><![CDATA[<p>A really simple and useful tip. The drag and drop functionality in Actionscript 3.0. You can use it to drag pictures from one spot to other, to put items in a shoping cart, to arrange objects in a specific order etc. I&#8217;ll show you how to match 3 different shapes in their corresponding spots.</p>
<p><span id="more-1060"></span>Here is the final movie:</p>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_figures_1190683014"
			class="flashmovie"
			width="560"
			height="300">
	<param name="movie" value="http://www.flashuser.net/flash-files/flash_tips_tricks/drag_drop_as3/figures.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/flash_tips_tricks/drag_drop_as3/figures.swf"
			name="fm_figures_1190683014"
			width="560"
			height="300">
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p>How is done:</p>
<p><strong>1.</strong> Create the 3 small shapes and put them individually in a Movie Clip. Also give each of them an instance name (I call them <strong>item1</strong>, <strong>item2</strong>, <strong>item3</strong>).</p>
<p><strong>2.</strong> Now for the large shape, create an empty Movie Clip (instance name <strong>bin1</strong>). Draw a circle without stroke and convert it to a Movie Clip. Give it an instance name of <em>&#8220;shape&#8221;</em> and place it at <strong>x=0</strong> and <strong>y=0</strong>. Create a new layer and draw there a circle same width and height like the first one but without fill. Place it at the same coordinates.</p>
<p><strong>3.</strong> For the triangle and rectangle follow the steps from point 2, except the empty Movie Clip instances.( rectangle -<strong> bin2</strong> , triangle &#8211; <strong>bin3</strong> )</p>
<p><strong>4.</strong> Create two Dynamic TextFields (instance name <strong>itemName_txt</strong> and <strong>info_txt</strong>) and place them in a empty Movie Clip (instance name <strong>ilabel</strong>).</p>
<p> <strong>5.</strong> Final step copy the actionscript code bellow and paste it in the <strong>Actions</strong> tab.</p>
<pre class="brush: as3;">
item1.objName = &quot;circle&quot;;
item1.initX = item1.x;
item1.initY = item1.y;
item1.val = 0;

item2.objName = &quot;rectangle&quot;;
item2.initX = item2.x;
item2.initY = item2.y;
item2.val = 0;

item3.objName = &quot;triangle&quot;;
item3.initX = item3.x;
item3.initY = item3.y;
item3.val = 0;

bin1.shape.alpha = 0;
bin2.shape.alpha = 0;
bin3.shape.alpha = 0;

item1.buttonMode = true;
item2.buttonMode = true;
item3.buttonMode = true;

item1.addEventListener(MouseEvent.MOUSE_DOWN, mousePress);
item1.addEventListener(MouseEvent.MOUSE_UP, mouseRelease);
item2.addEventListener(MouseEvent.MOUSE_DOWN, mousePress);
item2.addEventListener(MouseEvent.MOUSE_UP, mouseRelease);
item3.addEventListener(MouseEvent.MOUSE_DOWN, mousePress);
item3.addEventListener(MouseEvent.MOUSE_UP, mouseRelease);

//Mouse Events

function mousePress(event:MouseEvent):void {
	var item:MovieClip = MovieClip(event.target);
	item.startDrag();
	item.scaleX = item.scaleY = .95;
	var topPos:uint = this.numChildren - 1;
	this.setChildIndex(item, topPos);
	ilabel.itemName_txt.text = item.objName;
}

function mouseRelease(event:MouseEvent):void {
	var item:MovieClip = MovieClip(event.target);
	item.stopDrag();

	switch (item.objName) {
		case &quot;circle&quot; :
			if (bin1.hitTestObject(item)) {
				updateShape(item, bin1);

			} else {
				ilabel.info_txt.text =&quot;WRONG!&quot;;
				item.scaleX = item.scaleY = 1;
			}
			break;
		case &quot;rectangle&quot; :
			if (bin2.hitTestObject(item)) {
				updateShape(item, bin2);

			} else {
				ilabel.info_txt.text =&quot;WRONG!&quot;;
				item.scaleX = item.scaleY = 1;
			}
			break;
		case &quot;triangle&quot; :
			if (bin3.hitTestObject(item)) {
				updateShape(item, bin3);
			} else {
				ilabel.info_txt.text =&quot;WRONG!&quot;;
				item.scaleX = item.scaleY = 1;
			}
			break;
		default :
			; ;
	}
}
function updateShape(item:MovieClip, bin:MovieClip):void {
	ilabel.itemName_txt.text = &quot;&quot;;
	item.scaleX = item.scaleY = 1;
	item.visible = false;
	ilabel.info_txt.text =&quot;CORRECT!&quot;;
	bin.shape.alpha = 1;
	item.val = 1;
	resetShapes();
}

function resetShapes() {
	if ((item1.val == 1)&amp;&amp; (item2.val == 1) &amp;&amp; (item3.val == 1)) {

		item1.x = item1.initX;
		item1.y = item1.initY;
		item2.x = item2.initX;
		item2.y = item2.initY;
		item3.x = item3.initX;
		item3.y = item3.initY;

		bin1.shape.alpha = 0;
		bin2.shape.alpha = 0;
		bin3.shape.alpha = 0;

		item1.visible = true;
		item2.visible = true;
		item3.visible = true;

		item1.val = 0;
		item2.val = 0;
		item3.val = 0;

	}
}
</pre>
<div id="download-file"><a href="http://www.flashuser.net/flash-files/flash_tips_tricks/drag_drop_as3/drag_drop_as3.zip" target="_blank"><span>Download Source</span></a></div>
]]></description>
			<content:encoded><![CDATA[<p>A really simple and useful tip. The drag and drop functionality in Actionscript 3.0. You can use it to drag pictures from one spot to other, to put items in a shoping cart, to arrange objects in a specific order etc. I&#8217;ll show you how to match 3 different shapes in their corresponding spots.</p>
<p><span id="more-1060"></span>Here is the final movie:</p>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_figures_747480782"
			class="flashmovie"
			width="560"
			height="300">
	<param name="movie" value="http://www.flashuser.net/flash-files/flash_tips_tricks/drag_drop_as3/figures.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/flash_tips_tricks/drag_drop_as3/figures.swf"
			name="fm_figures_747480782"
			width="560"
			height="300">
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<p>How is done:</p>
<p><strong>1.</strong> Create the 3 small shapes and put them individually in a Movie Clip. Also give each of them an instance name (I call them <strong>item1</strong>, <strong>item2</strong>, <strong>item3</strong>).</p>
<p><strong>2.</strong> Now for the large shape, create an empty Movie Clip (instance name <strong>bin1</strong>). Draw a circle without stroke and convert it to a Movie Clip. Give it an instance name of <em>&#8220;shape&#8221;</em> and place it at <strong>x=0</strong> and <strong>y=0</strong>. Create a new layer and draw there a circle same width and height like the first one but without fill. Place it at the same coordinates.</p>
<p><strong>3.</strong> For the triangle and rectangle follow the steps from point 2, except the empty Movie Clip instances.( rectangle -<strong> bin2</strong> , triangle &#8211; <strong>bin3</strong> )</p>
<p><strong>4.</strong> Create two Dynamic TextFields (instance name <strong>itemName_txt</strong> and <strong>info_txt</strong>) and place them in a empty Movie Clip (instance name <strong>ilabel</strong>).</p>
<p> <strong>5.</strong> Final step copy the actionscript code bellow and paste it in the <strong>Actions</strong> tab.</p>
<pre class="brush: as3;">
item1.objName = &quot;circle&quot;;
item1.initX = item1.x;
item1.initY = item1.y;
item1.val = 0;

item2.objName = &quot;rectangle&quot;;
item2.initX = item2.x;
item2.initY = item2.y;
item2.val = 0;

item3.objName = &quot;triangle&quot;;
item3.initX = item3.x;
item3.initY = item3.y;
item3.val = 0;

bin1.shape.alpha = 0;
bin2.shape.alpha = 0;
bin3.shape.alpha = 0;

item1.buttonMode = true;
item2.buttonMode = true;
item3.buttonMode = true;

item1.addEventListener(MouseEvent.MOUSE_DOWN, mousePress);
item1.addEventListener(MouseEvent.MOUSE_UP, mouseRelease);
item2.addEventListener(MouseEvent.MOUSE_DOWN, mousePress);
item2.addEventListener(MouseEvent.MOUSE_UP, mouseRelease);
item3.addEventListener(MouseEvent.MOUSE_DOWN, mousePress);
item3.addEventListener(MouseEvent.MOUSE_UP, mouseRelease);

//Mouse Events

function mousePress(event:MouseEvent):void {
	var item:MovieClip = MovieClip(event.target);
	item.startDrag();
	item.scaleX = item.scaleY = .95;
	var topPos:uint = this.numChildren - 1;
	this.setChildIndex(item, topPos);
	ilabel.itemName_txt.text = item.objName;
}

function mouseRelease(event:MouseEvent):void {
	var item:MovieClip = MovieClip(event.target);
	item.stopDrag();

	switch (item.objName) {
		case &quot;circle&quot; :
			if (bin1.hitTestObject(item)) {
				updateShape(item, bin1);

			} else {
				ilabel.info_txt.text =&quot;WRONG!&quot;;
				item.scaleX = item.scaleY = 1;
			}
			break;
		case &quot;rectangle&quot; :
			if (bin2.hitTestObject(item)) {
				updateShape(item, bin2);

			} else {
				ilabel.info_txt.text =&quot;WRONG!&quot;;
				item.scaleX = item.scaleY = 1;
			}
			break;
		case &quot;triangle&quot; :
			if (bin3.hitTestObject(item)) {
				updateShape(item, bin3);
			} else {
				ilabel.info_txt.text =&quot;WRONG!&quot;;
				item.scaleX = item.scaleY = 1;
			}
			break;
		default :
			; ;
	}
}
function updateShape(item:MovieClip, bin:MovieClip):void {
	ilabel.itemName_txt.text = &quot;&quot;;
	item.scaleX = item.scaleY = 1;
	item.visible = false;
	ilabel.info_txt.text =&quot;CORRECT!&quot;;
	bin.shape.alpha = 1;
	item.val = 1;
	resetShapes();
}

function resetShapes() {
	if ((item1.val == 1)&amp;&amp; (item2.val == 1) &amp;&amp; (item3.val == 1)) {

		item1.x = item1.initX;
		item1.y = item1.initY;
		item2.x = item2.initX;
		item2.y = item2.initY;
		item3.x = item3.initX;
		item3.y = item3.initY;

		bin1.shape.alpha = 0;
		bin2.shape.alpha = 0;
		bin3.shape.alpha = 0;

		item1.visible = true;
		item2.visible = true;
		item3.visible = true;

		item1.val = 0;
		item2.val = 0;
		item3.val = 0;

	}
}
</pre>
<div id="download-file"><a href="http://www.flashuser.net/flash-files/flash_tips_tricks/drag_drop_as3/drag_drop_as3.zip" target="_blank"><span>Download Source</span></a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.flashuser.net/flash-tricks/tips-tricks-10-using-drag-drop-in-actionscript-3-0.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Freebie: XML Image Viewer AS3</title>
		<link>http://www.flashuser.net/flash-actionscript-as3/freebie-xml-image-viewer-as3.html</link>
		<comments>http://www.flashuser.net/flash-actionscript-as3/freebie-xml-image-viewer-as3.html#comments</comments>
		<pubDate>Wed, 05 Aug 2009 14:22:58 +0000</pubDate>
		<dc:creator>flashuser</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flash Gallery]]></category>
		<category><![CDATA[Freebies]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[image gallery]]></category>
		<category><![CDATA[xml image]]></category>

		<guid isPermaLink="false">http://www.flashuser.net/?p=1006</guid>
		<description><![CDATA[<p>This freebie is a XML driven image viewer built in Actionscript 3.0. It&#8217;s very easy to integrate in your projects, change the images path and description text from XML. </p>
<p><span id="more-1006"></span>If you want to change the thumbs into vertical mode configure <strong>horizontalMode</strong> variable from the FLA file. Also for other parameters check the FLA. Don&#8217;t forget to give us credits for this file if you intend to use it. </p>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_image_viewer_as3_196393111"
			class="flashmovie"
			width="500"
			height="350">
	<param name="movie" value="http://www.flashuser.net/flash-files/freebie/image_viewer/image_viewer_as3.swf" />
	<param name="base" value="http://www.flashuser.net/flash-files/freebie/image_viewer/" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/freebie/image_viewer/image_viewer_as3.swf"
			name="fm_image_viewer_as3_196393111"
			width="500"
			height="350">
		<param name="base" value="http://www.flashuser.net/flash-files/freebie/image_viewer/" />
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<div id="download-file"><a href="http://www.flashuser.net/flash-files/freebie/image_viewer/image_viewer.zip" target="_blank"><span>Download Source</span></a></div>
]]></description>
			<content:encoded><![CDATA[<p>This freebie is a XML driven image viewer built in Actionscript 3.0. It&#8217;s very easy to integrate in your projects, change the images path and description text from XML. </p>
<p><span id="more-1006"></span>If you want to change the thumbs into vertical mode configure <strong>horizontalMode</strong> variable from the FLA file. Also for other parameters check the FLA. Don&#8217;t forget to give us credits for this file if you intend to use it. </p>
<div align="center" class="border-media">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_image_viewer_as3_1772413821"
			class="flashmovie"
			width="500"
			height="350">
	<param name="movie" value="http://www.flashuser.net/flash-files/freebie/image_viewer/image_viewer_as3.swf" />
	<param name="base" value="http://www.flashuser.net/flash-files/freebie/image_viewer/" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashuser.net/flash-files/freebie/image_viewer/image_viewer_as3.swf"
			name="fm_image_viewer_as3_1772413821"
			width="500"
			height="350">
		<param name="base" value="http://www.flashuser.net/flash-files/freebie/image_viewer/" />
	<!--<![endif]-->
		<br />
 <!-- Begin Alternate Content --></p>
<p>
 <a href="http://adobe.com/go/getflashplayer"><br />
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /><br />
</a>
 </p>
<p><!-- End Alternate Content --></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<div id="download-file"><a href="http://www.flashuser.net/flash-files/freebie/image_viewer/image_viewer.zip" target="_blank"><span>Download Source</span></a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.flashuser.net/flash-actionscript-as3/freebie-xml-image-viewer-as3.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
