When does flash execute code?

i’m wondering how flash works when it comes to executing code. when exactly does it begin executing onEnterFrame actionscript, and what determines fps? for example, if you have your movie/game/whatever set to run at 60 frames per second, does flash wait 1/60th of a second before it begins executing code and determining how to draw everything, and then finally loads the frame when all the necessary code has been executed? or does it begin to do things in advance, before the frame is scheduled to be loaded? i’m trying to get a feel for how flash does what it does, so if you can answer my question that would be awesome, but if you have any other thoughts/comments on how flash runs then please share those too :slight_smile: