views:

310

answers:

2

Flash's MovieClip timeline is created in such way that can skip frames to preserve animation smoothness and audio sync.

My question is, if there is ActionScript on a frame, will there be any chance the frame is skipped so the script isn't called?

Or the frames that have script will never be skipped? What is the mechanism?

+5  A: 

No, frame scripts are never skipped. Internally Flash processes every frame in some sense; the only thing that happens when frames are skipped is that they don't get rendered to the screen. Incidentally, that only happens when the type of the audio is "Stream" - frames are never skipped if the audio is "Event", or if there is no audio playing.

fenomas
So, when it say skip frame, it's just skip rendering that frame? That's only the sending graphic commands part, right?
Andy Li
Right - events are processed, and frame scripts get executed normally. It's just that the screen gets visually updated less frequently.
fenomas
+1  A: 

What fenomas said, basically.

When Flash compiles the FLA it takes all frame based Actionscript and sticks it in one big central AS file, and proceeds to use internal methods to call those blocks of code when appropriate. Frame scripts are never lost.

Jasconius