rss twitter

How to first setup TweenLite v11

Hey,
as I recently had to tell someone how and why to use TweenLite v11 (or any other Tweening Engine in AS3) I wanted to share that two minutes conversation with you. I think there will be following some other articles about TweenLite here - i guess there will be more Q&A talks concerning specific animations / techniques.

Setting up TweenLite is pretty simple at all. Just download the latest version for AS3 at the right top on this site: GreenSock Tweening Platform and unzip it. There were some minor changes in GreenSock's package order, so the following steps are written for v11.

In the unzipped folder you find some subfolders, containing docs, demos, badges and the like. If you're working withing the Flash IDE copy the com folder to the folder your .fla is saved. If you're using FDT or any other Coding IDE just link the .swc as a Library Source.

To use TweenLite and it's easing (and any other external Class not saved on the same directory-level) you have to import it with

Actionscript:
  1. import com.greensock.TweenLite;
  2. import com.greensock.easing.*;

Now having a DisplayObject on stage you can tween it with the following syntax:

Actionscript:
  1. TweenLite.to($myClip, $timeInSeconds, {$propObj});

Care for the brackets. With this setup you can easily fadeout any DisplayObject on stage with:

Actionscript:
  1. TweenLite.to(myClip, 1.5, {alpha:0, ease:Linear.easeOut});

That's it.. more articles covering different easing-types, iterating multiple children, dealing with delays and overwrites are coming soon. Stay tuned for some hellish cool animations any timeline would have to struggle with! :)

3 Responses to “How to first setup TweenLite v11”

  1. FlashBlink says:

    Hi, thanks for putting that online! Looking forward to your Tweening skills ^^

  2. [...] da noch einige tutorials folgen und ich werde dann einfach immer den thread hier aktualisieren. Step 1 | Basic TweenLite (v11) Setup __________________ * Flash-Junkie ≠ Musiker & Grafiker # Marvin B. # The finer Art of [...]

  3. Dotty says:

    Tell people to look the website & documentations...
    http://www.greensock.com/tweenlite/

Leave a Reply

Powered by WordPress | Free T-Mobile Phones for Sale | Thanks to Palm Pre Blog, Video Game Music and Get Six Pack Abs