Sunday, April 3, 2011

Flash motion speed via ActionScript 2.0 / moving keyframes in timeline?

Hi,

I'm currently working on a Flash project in which an object is moving along a motion guide path. However, the keyframes dictate the speed of that movement. I'm looking for a way to change the movement speed via ActionScript 2 code.

Do you have any hints on how to accomplish this? Could I maybe just change the position of the second keyframe in the timeline?

From stackoverflow
  • I think the best way would be to do the entire animation in Actionscript. You can easily do most of the Flash stage effects (motion, alpha and color tweens) with simple actionscript. For more advanced effects (for example, time-based animation), there are a number of libraries (such as this one).

  • I would too recommend doing the animation in code if possible. If this isn't practical (which it might not be seeing that you're using a motion guide) I would do the animation as long as the slowest scenario would make it, and then use gotoAndStop(Math.round(_totalframes * progress)) to step through it.

0 comments:

Post a Comment