O'Reilly Hacks
oreilly.comO'Reilly NetworkSafari BookshelfConferences Sign In/My Account | View Cart   
Book List Learning Lab PDFs O'Reilly Gear Newsletters Press Room Jobs  



Flash MX 2004 - Hidden Tweens
Using some undocument classes built into Flash Player 7, you can create transistions and tween via code easily and without custom actionscript.

Contributed by:
Unknown User anonymous2
[01/15/04 | Discuss (3) | Link to this hack]

The new Flash authoring templates for Slideshow hint at a powerful tween and transistion engine buried in the Flash player. In the behaviors palette, you can create transistions, this hack adapts the code in that behavior and allows you to tween a Movieclip in 16 different ways across any property available through the standard setProperty properties available to any movieclip.

It seems as though the easng equations made famous by Robert Penner have been included in and used to produce a tween / easing class for Flash MX 2004. this is just undocumented and definitely a gem of a find

To use the hack take a look at this Actionscript:
foobarTween=new mx.transitions.Tween(targetObj,_property,easingEquation,startPosition,endPosition,duration);
Here is a more conrete example:
tween=new mx.transitions.Tween(clip,"_x",Strong.easeOut,1,300,50);

Here is a sample: http://webzone.k3.mah.se/projects/dgomezone/fmx2004dev/testallMX2004EASING.html Contact me for further explanation: chadu@mac.com

See also: http://flashmx2004.com/forums/index.php?s=cc223cd1bccb3b95b29c247ab2112a9d&showtopic=64&st=0


O'Reilly Home | Privacy Policy

© 2007 O'Reilly Media, Inc.
Website: | Customer Service: | Book issues:

All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.