Tween Rotate in Actionscript 3.0

I Just discovered the Tween() class in AS3. It’s pretty awesome and I think I’ll be using this quite a bit. Basically to make something rotate, you use this:

var myTweenRotation1:Tween = new Tween(img1_mc, “rotation”, Strong.easeOut, 114, 184, 3, true);

And your movie clip img1_mc will rotate smoothly with easing and everything. As you can probably figure out, changing the “rotation” parameter to some other object property – say ‘”scaleX” and “scaleY” for scaling or “x” and “y” for position – makes this Tween class pretty powerful. I have yet to really explore all the options and parameters, but this Actionscript 3 Tweens Tutorial seems like it might come in handy.

Good luck.

2 Responses to “Tween Rotate in Actionscript 3.0”

  1. attic insulation houston Says:

    And your movie clip img1_mc will rotate smoothly with easing and everything. As you can probably figure out, changing the “rotation” parameter to some other object property – say ‘”scaleX” and “scaleY” for scaling or “x” and “y” for position – makes this Tween class pretty powerful. I have yet to really explore all the options and parameters, but this Actionscript 3 Tweens Tutorial seems like it might come in handy.

  2. zedia.net Says:

    Better yet, instead of using the classes that comes with Flash you should consider using the TweenLite library. It is faster and easier to use. I also made a tutotial about those here http://www.zedia.net/2008/actionscript-3-tweenlite-basic-tutorial/

    Have fun

Leave a Reply

This entry was posted on Friday, July 17th, 2009 at 12:15 am and is filed under Flash Design & Development. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.