Jump to content
Search Community

How to use GreenSock tweening in timeline based animation?

adifrank test
Moderator Tag

Recommended Posts

Hi. I'm kind of new to all this. I've been using GreenSock for tweening in ActionScript. From what I've understood, the tweening done by GreenSock is superior in quality to the standard tween offered within Adobe Flash. Can someone please explain to me how to use the GreenSock tween also for timeline based animations done within Flash (as opposed to using GreenSock within in an AS3 based Flash project)?

 

Thanks

Link to comment
Share on other sites

Hello,

 

I don't know if I quite understand your question

how to use the GreenSock tween also for timeline based animations done within Flash (as opposed to using GreenSock within in an AS3 based Flash project)?

 

if you are using GreenSock tweening tools, you are going to be using AS2 or AS3.

If you want to use TweenLite/Max to control an existing timeline based animation either in a Movie Clip or on the Main Timeline you can use the frame and frameLabel plugins.

 

Here is a basic overview of using the frameLabel plugin with TweenMax

 

http://www.snorkl.tv/2010/10/overview-o ... backwards/

 

If you need more help, please clarify the question, would love to assist you.

 

Carl

Link to comment
Share on other sites

Hi Carl, thanks for your reply.

 

I think it might have answered my question... but I'm not absolutely sure. :mrgreen:

 

According to the video in the link you sent me I can take a motion tween that I built in the Flash timeline and control it using the TweenMax Frame Plug-in and entering the appropriate code in an actions layer in that same timeline. From this video I understand I can then use the plug-in to very easily change the speed of the tween and even make it play backwards.

 

Going back to my original question - I have understood that motion tweening with GreenSock has not only functional advantages, as opposed to the standard motion tween offered in Adobe Flash, but also is superior quality-wise. For example here: http://www.greensock.com/tweening-speed-test/

So regarding your reply and reference to the TweenMax plug-in for controlling timeline based motion tweens - does this mean that the quality of the tween is improved as well? Will this make the tween a "GreenSock Tween" as far as the quality? or is it still an inferior quality standard motion tween, but with the added functionality provided by the plug-in?

 

If my question is still unclear, please let me know. THX!

Link to comment
Share on other sites

Well, there are several ways to define the "quality" of a tween. First would be the performance in terms of CPU load. TweenLite and TweenMax are indeed much faster than Adobe's Tween class (and most, if not all, other tweening engines). However, what you're talking about isn't using Adobe's Tween class - you're using actual MovieClip timeline tweens that are built in the Flash IDE which do NOT use Adobe's Tween class for animation. Those are a completely different beast and they are simply frame-based pre-calculated renders. Using TweenLite/Max to tween the frame of a MovieClip offers no real performance advantage at all compared to just playing that MovieClip normally.

 

Another way to define the "quality" of a tween is its smoothness and flexibility. In this regard, TweenLite/Max can certainly offer an advantage because they are dyamically interpolated whereas MovieClip-based tweens are fixed-resolution. For example, if you build a MovieClip-based tween in the Flash IDE that has an object moving 300 pixels across the screen over the course of 30 frames, that means that it would move at 10 pixels per frame (assuming playback is set to 30fps). That's a fixed resolution. If you ran that tween at half-speed at runtime, it would start to look jerky because it only has 30 positions to choose from during that whole animation, each 10 pixels apart. So it would basically jump 10 pixels every 2 frames. Using TweenMax to tween those frames doesn't suddenly make it "higher quality" either because you're working with a fixed number of frames on a MovieClip timeline.

 

However, if you used TweenLite/Max to do that tween originally (no MovieClip timeline-base tween), you get the advantage of the dynamic interpolation which means that if you ran that tween at half speed, it would pick new positions to render it on the screen, essentially using 60 positions now instead of 30. If you ran it at 1/10th the normal speed, it would still look perfectly smooth as it dynamically figures out where those x/y values should be on-the-fly.

 

So if you want the highest quality tweens, I'd typically recommend always using ActionScript-based TweenLite/Max ones rather than building out MovieClip tweens on the timeline in the Flash IDE. In some situations, though, MovieClip timelines are the only realistic option like if you need to visually keyframe each move (maybe to line up with something in a video) or use complex motion paths to guide the motion, but these situations are very rare.

 

Does that clear things up?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...