I have done a little coding in AS2 now, so I should now this, but I need someone to clear things out for me.
I've only been writing code in the first frame of the main timeline, in classes and occasionally in movieclip frames. But as I realize that it's common to write in several frames of the main timeline, it makes me wonder about the order in which things are executed... I know it's not run top down, but on many sites in parallell, but still - confusing.

I tried making a stop() at the first frame, and move it over to frame 2 and stop by the press of a button. Cool. So, it seems like it would be able to start anew on a new frame, go on with you life, so to speak, or stay and pause the game, and then go back. BUT, then I put a onEnterFrame function in frame 1 and it seems that THAT is executed all the time, even when stopped on frame 2. I guess, so would movieclip code be...

So, what are the rules for how this works? What is linear and what isn't? If the onEnterFrame ALWAYS will happen, even when not in the frame where it's written, similar problems like the classic pause-problem must arise when you want to go back to menus, game over screens, info screens and such? (and must be solved by a couple of booleans?)