<?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>@Diacre &#187; transitions</title>
	<atom:link href="http://ducharme.cc/tag/transitions/feed/" rel="self" type="application/rss+xml" />
	<link>http://ducharme.cc</link>
	<description>father, francophile, former pro wrestler, improvisational comedian, coder and all around good guy ;)</description>
	<lastBuildDate>Fri, 03 Feb 2012 19:59:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Transitions and the Transition Manager</title>
		<link>http://ducharme.cc/transitions-transition-manager/</link>
		<comments>http://ducharme.cc/transitions-transition-manager/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 05:43:36 +0000</pubDate>
		<dc:creator>Deacon</dc:creator>
				<category><![CDATA[Flash Friday]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[transitions]]></category>

		<guid isPermaLink="false">http://ducharme.cc/?p=364</guid>
		<description><![CDATA[With Flash CS4 ( and CS3 for that matter ) comes a great utility for simple visual effects, the Transition Manager and accompanying transitions. With this tool you can use some common transitions without much complex coding on your side. The following is a list of the available transitions. Blinds Fade Fly Iris Photo PixelDissolve [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="Wipe Effect" src="http://t0.gstatic.com/images?q=tbn:V-9EDTLUkzizDM%3Ahttp://flash-effects.com/wp-content/uploads/2009/02/wipe-transition-swf-image.jpg" alt="" width="127" height="92" />With Flash CS4 ( and CS3 for that matter ) comes a great utility for simple visual effects, the <a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/index.html" target="_blank">Transition Manager</a> and accompanying <a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/index.html">transitions</a>. With this tool you can use some common transitions without much complex coding on your side. The following is a list of the available transitions.</p>
<ul>
<li><a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/fl/transitions/Blinds.html">Blinds</a></li>
<li><a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/fl/transitions/Fade.html">Fade</a></li>
<li><a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/fl/transitions/Fly.html">Fly</a></li>
<li><a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/fl/transitions/Iris.html">Iris</a></li>
<li><a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/fl/transitions/Photo.html">Photo</a></li>
<li><a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/fl/transitions/PixelDissolve.html">PixelDissolve</a></li>
<li><a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/fl/transitions/Rotate.html">Rotate</a></li>
<li><a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/fl/transitions/Squeeze.html">Squeeze</a></li>
<li><a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/fl/transitions/Wipe.html">Wipe</a></li>
<li><a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/fl/transitions/Zoom.html">Zoom</a></li>
</ul>
<div>Transitions can be used by themselves or mixed together for an even more professional look. And all this is very easy because of the power and simplicity of the Transition Manager class. Using the class is very simple. The following code performs a simple fade in on an imaginary MovieClip instance named myClip.</div>
<pre>import fl.transitions.*;
var transitionMgr:TransitionManager = new TransitionManager( myClip );
var params:Object = new Object();
params.type = Fade;
params.direction = Transition.IN;
var transition:Transition = transitionMgr.startTransition( params );</pre>
<div>The above code could also be done with the static start() method, like so:</div>
<pre>import fl.transitions.*;
var params:Object = new Object();
params.type = Fade;
params.direction = Transition.IN;
var transition:Transition = TransitionManager.start( myClip, params );</pre>
<div>Using the static start() method is a bit cleaner. However, if you need to do multiple transitions to the same movieclip the first method is best.</div>
<p>[ad#Google Adsense]</p>
<h2><span>Using Parameters</span></h2>
<p><span>The two transition methods both take a parameters object, but you might be wondering what goes in the object. That depends on a few things and here are some options.</span></p>
<ol>
<li><span>The type is required &#8211; enter one of the 10 above.</span></li>
<li><span>Other common properties for all transitions include</span>
<ol>
<li><span>direction &#8211; choices are Transition.IN and Transition.OUT ( default is Transition.IN )</span></li>
<li><span>duration &#8211; this is measured in seconds</span></li>
<li><span>easing &#8211; This is a function. I believe the default is None.none;</span></li>
</ol>
</li>
<li><span>You can add parameters specific to the fade type you are using( i.e. numStrips for a Blinds transition )</span></li>
</ol>
<h2>When does it end?</h2>
<p>When looking at the documentation for the Transition and Transition Manager classes, there appears to be a problem. If you want to do something when the transition(s) are done there doesn&#8217;t appear to be any events that tell you when this occurs. The truth is there are events that get fired, the documentation is just lacking. The events that get fired are of type flash.event.Event and there are no constants to give you any auto completion help.</p>
<p>For the transitions the following events may be fired:</p>
<ul>
<li>&#8220;transitionInDone&#8221;</li>
<li>&#8220;transitionOutDone&#8221;</li>
<li>&#8220;transitionProgress&#8221;</li>
</ul>
<p>The TransitionManager fires the following 2 events</p>
<ul>
<li>&#8220;allTransitionsInDone&#8221;</li>
<li>&#8220;allTransitionsOutDone&#8221;</li>
</ul>
<h2>Example</h2>
<p>With all the above in mind I thought I would show each of the different transitions and the events that fire. Each transition uses all of its defaults, but you do get to choose the direction so you can see the different complete events <img src='http://ducharme.cc/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="550" height="400" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://ducharme.cc/wp-content/uploads/2010/01/transition.swf" /><embed type="application/x-shockwave-flash" width="550" height="400" src="http://ducharme.cc/wp-content/uploads/2010/01/transition.swf"></embed></object></p>
<h2>One Last Thing</h2>
<p>The Transition classes unfortunately are only coded to work with MovieClip instances. For many people who don&#8217;t code in MovieClips you may have to find a different solution but for most users of Flash CS4+ this shouldn&#8217;t be a problem.<br />
[ad#Adobe Banner]<br />
If you liked this post please subscribe to my <a href="http://ducharme.cc/feed">RSS feed</a> and/or <a title="My twitter page" href="http://twitter.com/diacre" target="_blank">follow me on Twitter</a>. If you only want to see my <a href="http://ducharme.cc/category/flash-friday/" target="_blank">Flash Friday posts</a> you can follow the subscribe to the <a href="http://ducharme.cc/category/flash-friday/feed">Flash Friday feed</a>. How&#8217;s that for alliteration <img src='http://ducharme.cc/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Until next time keep on coding.</p>
]]></content:encoded>
			<wfw:commentRss>http://ducharme.cc/transitions-transition-manager/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

