load screen question + irritating button

Okee, I’ve got the majority of my game figured out except for a couple irritating points.

The first is my loading screen. I had it working just fine with a filling bar and a byte count, just dandy, but now my game loads in an unintended order when I try to simulate download… So instead of my loading screen popping up with my load bar/byte count at the beginning with the first couple of percents finished(the load screen itself) It stays blank for a while then pops up at 70% finished(having loaded other scenes first).

scene 3: game itself
frame 1: the actual game code, it’s blank, all sprites, backgrounds, text boxes and otherwise are added by the code when you run the game.
frame 5: a currently nonfuctional Game Over screen.

I know this is all probably messy, well, you should see my code XD But it’s working just fine except for the load bar, so the bottom line is: how can I determine what gets loaded first? The scenes are names almost exactly as stated above, so I was wondering if maybe it loaded alphabetically? Is there a command for forced loading orders? please help, I’m going to reply to this thread with my next question to keep them seperate…

You need to turn off ‘export in first frame’ for all your symbols and bitmaps.
The option is accessible by opening the symbol’s properties or linkage dialogue boxes. It’s only selectable if you’ve selected ‘export for actionscript’.
Once you’ve done that, you’ll need to put a copy of the symbol on some other timeline frame (which you don’t need to ever display).

Now the button… I have a game over screen in the same scene of the game itself, but the button to go back to the menu won’t work. I put a trace line in the menu frame and it says it goes to the menu, but it’s not appearing… Do I need to go into the onRelease function and remove all the existing movieClips? Also, what’s the movieClip._? for depth? Is there a good for() loop that can go through all the layers and remove whatever’s there?

You’ll need to delete any movieclips that you drew with code and you want to get rid of. If you’ve covered the entire screen you won’t be able to see any stuff (like a menu) that you drew in the frame.

There isn’t a movieclip variable for the depth, but you can swap depths with another movieclip (or an empty depth) using the swapDepths method.

You can loop through mcs and delete them. How you do it depends on how you’re set up.
I’ve used this in a generic clear screen routine:

I’m not familiar with AS3 specifically, but rather than let this question just kinda float here I’ll say that in most languages, the way the for( i in whatever) construct works is basically that whatever is an array, and every time through the for loop i becomes one member of the array.

The following pseudo-code, for instance, would print out the first six prime numbers:

Hey, do you like games? So do we — that’s what makes Kongregate the best source of free games online. We have thousands upon thousands of free online games, from both one-man indies and large studios, rated and filtered so you can play the best of the best. Read more »