Let system time determine animation speed, not program FPS

Posted by Anders on Stack Overflow See other posts from Stack Overflow or by Anders
Published on 2010-03-26T14:34:36Z Indexed on 2010/03/26 14:53 UTC
Read the original article Hit count: 498

Filed under:
|
|
|
|

I'm writing a card game in ActionScript 3. Each card is represented by an instance of a class extending movieclip exported from Flash CS4 that contains the card graphics and a flip animation. When I want to flip a card I call gotoAndPlay on this movieclip.

When the frame rate slows down all animations take longer to finish. It seems Flash will by default animate movieclips in a way that makes sure all frames in the clip will be drawn. Therefor, when the program frame rate goes below the frame rate of the clip, the animation will be played at a slower pace.

I would like to have an animation always play at the same speed and as a consequence always be shown on the screen for the same amount of time. If the frame rate is too slow to show all frames, frames are dropped. Is is possible to tell Flash to animate in this way? If not, what is the easiest way to program this behavior myself?

© Stack Overflow or respective owner

Related posts about as3

Related posts about movieclip