wierd flashing

7 posts

Flag Post


I am having a problem I can’t get any traction with.

When testing my game, which had been coming along OK, it stopped working with the following symptom: It just put up the cover page and began to flash white-coverpage-white. It seems to be restarting constantly.

I began stepping through the script I was working on to see what was causing it, and nothing seemed to stop it. Then I commented out ALL my actionscript and it still loaded in a flashing mode. Maybe I changed some setting accidentally?

Flag Post

did you forget to put


on the frame?

Flag Post

Hmmm, that worked. But I still don’t understand – I didn’t have stop() before and it was working fine – and I don’t have stop() now anyplace except the coverpage.

Should I have stop() on all my static pages? I guess currently they are in a loop of 1 step. And why did that suddenly change behavior on the first page?


Flag Post

This is a basic problem:

Flash starts out in a flash-movie format. So, Flash puts play(); on Frame Zero. If you do not put stop(); on the First Frame, Flash would play it like a movie (Frame 1, Frame 2, Frame 3)

To make it play again, you would need to do two things:

Put play(); on the frame you want to start playing. For example, Frame 1 has a stop(); Frame 2 and 3 have nothing, Frame 4 has play(); Frame 5 and Frame 6 have nothing. It would stop at Frame 1, then you would have to manually go to Frame 2, 3, and 4, once you’re on Frame 4, it would play Frame 4, 5, 6, and stop at 1. To prevent this, you would need to put a stop(); on Frame 6

Use gotoAndPlay(); instead of gotoAndStop(); but this is not recommended if you’re using nextFrame();

Note that if you do play(); it will automatically do play(); for all the other frames until you call stop(); and vice-versa. Same for stop();

Flag Post

Well, unless we knew the deatils of your setup it’d be a tough call, but yes, absolutely, 100% true: use stop(); often.

Flag Post

I think I understand – thanks!

Flag Post

The other thing to bear in mind is that if your script takes a while to load (if its more than a few kb), Flash may have played on to the next frame before executing a frame’s script (which says stop() or whatever). Which can make things a little confusing. This particularly happens if you’ve got a lot of assets set to load in the first frame.

So make sure you’ve loaded up at least enough to continue before progressing. Most games just stick a preloader on frame 1 and sit around until everything is loaded, but you can do it in stages if you can be bothered. (That probably isn’t worth it for anything under 200kb.)