Nook Schreier
04-25-2006, 03:57 PM
I've been making a few simple Flash games to teach myself how to use it (MX Pro 2004). However, it seems that the reaction to stop(); seems to change inconsistently. In my current program (a game like Breakout), frame sets up variables, frame 2 is the gameplay frame, frame 3 contains only "prevFrame();" 4 sets up the board and decides if the game is over (and displays the corresponding information). Normally, of course, it should just keep going back and forth between frames 2 & 3. In #2, if sees if all bricks (or the bottom hit, etc) and will jump to frame 4.
Most of this probably isn't important to my question, but it may, I'm an ActionScript newbie.
Anyway, in frame 4 there are a few places where it is supposed to stop (no lives left, last board reached, etc). If I put a trace there, the trace message appears, so I know that the code is being executed when it should. Regardless what "stop" I put, it will either pass it over or skip to the next frame. I've tried stop(), _root.stop(), and this.stop, with various results except the one I want -- a dead stop.
Any ideas what I'm missing? If you want, I can post the whole code (besides the objects/classes, it's all very small), although there's nothing tremendously complicated to it, so I can't imagine that it would help a lot. I'm assuming it's just that I'm misunderstanding how the commands work or something.
Most of this probably isn't important to my question, but it may, I'm an ActionScript newbie.
Anyway, in frame 4 there are a few places where it is supposed to stop (no lives left, last board reached, etc). If I put a trace there, the trace message appears, so I know that the code is being executed when it should. Regardless what "stop" I put, it will either pass it over or skip to the next frame. I've tried stop(), _root.stop(), and this.stop, with various results except the one I want -- a dead stop.
Any ideas what I'm missing? If you want, I can post the whole code (besides the objects/classes, it's all very small), although there's nothing tremendously complicated to it, so I can't imagine that it would help a lot. I'm assuming it's just that I'm misunderstanding how the commands work or something.