Ease my tweens!

โ€”

by

in

More tasty [[Flash]] goodness. It turns out that you can convince the transition manager built into the MX2004 version to deal with things other than the slide and screens it was built for. Since slides and screens are built on movieclips, the transition manager doesn’t care. Here is an example, assuming that movieClip is a movieclip! After that, look deeper in this entry for cool stuff ๐Ÿ™‚

mx.transitions.TransitionManager.start(movieClip,”_alpha”,Strong.easeOut,100,1,10);

The totally awesome DGomes over at the flashmx2004.com forums hacked together a small .xml file that will add the transition manager to movieclips from the behavior drop down.  As he mentions in this thread, just save it in the behavior folder and enjoy!

<?xml version=”1.0″?>
<flash_behavior version=”1.0″>
<behavior_definition dialogID=”Transitions-dialog” defaultEvent=”release” category=”MovieClip” class=”MovieClip” name =”outsidescreen Transition”>

<properties>
 <property id=”type” default=”Iris”/>
 <property id=”direction” default=”0″/>
 <property id=”duration” default=”2″/>
 <property id=”easing” default=”None.easeNone”/>
 <property id=”param1Name” default=”startPoint”/>
 <property id=”param1Value” default=”5″/>
 <property id=”param2Name” default=”shape”/>
 <property id=”param2Value” default=”SQUARE”/>
</properties>

  <dialog id=”Transitions-dialog” title=”Transitions” buttons=”accept, cancel”>

    <flash id=”Transitions” src=”Transitions.swf” width=”475″ height=”305″/>

  </dialog>
 
<actionscript>
<![CDATA[
// Hacked Transition behavior
 mx.transitions.TransitionManager.start (this,
  {type:mx.transitions.$type$,
  direction:$direction$, duration:$duration$, easing:mx.transitions.easing.$easing$,
  $param1Name$:$param1Value$, $param2Name$:$param2Value$});
//end
]]>
</actionscript>

</behavior_definition>
</flash_behavior>

More references: