Coding Help for Menus!!!

7 posts

Flag Post

Ok, so I had a perfectly coded game that had no problems in it really, and I just added a Menu onto the Movie and now when I go to the frame with the game all my loops are like not ending, movieclips with animation inside them are just always playing and weird things are happening. Ive seen this setup for games with menus before but Im not sure if It is right.

I have 6 Frames:

One frame for a preloader, one blank one with all my mcs, sounds, etc. for loading, one for the menu, one for the options, one for instructions, and one for the actually game and all the game code.

Now I thought this would work If I just do a gotoAndStop(6); to go to the game or w/e when I press the “Play” button, but then all this weird stuff is happening.

Does anyone know how I can better set this up or what the problem is??

Thanks

 
Flag Post

This happened to me when my game was overloaded with movieclips and I was trying to skip lots of frames. It’s really strange, if I let it play through without a play button…it would be fine, but if i skipped the start it wouldn’t. I figured something to do with Flash putting it together properly if I skipped too quick.

Only thing I know is if you can try decreasing the movieclips and junk you have laying around in your clips you don’t need, and breaking apart movieclips that don’t need to be there.

Thats what worked for me, hopefully it helps you a bit.

 
Flag Post

I dont think its that cause my game is really small and only has like 20 movieclips. It just seems that when i added some frames with code before the game, it started doing this… any other suggestions?

 
Flag Post

Try putting a preloader at the start – don’t go on until the whole thing has loaded – even if it is really small. (Eggy – this is probably your issue too.)

If that doesn’t work, here are some other possibilities:

Did you gotoAndPlay instead of gotoAndStop?

Did you overload a variable with another (perhaps an mc inside another has the same instance name as a variable you’ve just created)?

Are you failing to run some initialisation code now?

 
Flag Post

I did, thats the problem, as soon as I added the preloader and menus the game started crashing and weird things happened

 
Flag Post

Add preloader. Don’t move further into the movie until all is loaded.

If weirdness persists post your .fla so we can help.

 
Flag Post

omg, does noone actually read what was said???