Designing the structure of a Flash game – AS3 version – Part 3
The game structure is getting more and more complete… now, according to the comments to Designing the structure of a Flash game – AS3 version – Part 2, you are able to return to main menu from level selection screen, level passed screen, and level failed screen.
Here it is the new diagram:

Moreover, I made some code optimization and now you can only play levels you already completed and the first uncompleted level, thanks to AS3 shared objects.
This is the game:
Next time, I’ll add sound button and some real graphics.
They can be easily customized to meet the unique requirements of your project.















(5 votes, average: 4.60 out of 5)









This post has 9 comments
RJ
Just a small thing: in the level passed screen, the top button should be Next level, then Level select and Main menu the last one. It’s more intuitive, I think
Shival
Good, but this is hardly a development…you could ‘ve included it earlier. I thought you were going to include the highscore tables etc…
Patrick
I agree with RJ. Clicking through it I instinctively clicked on the wrong link due to its placement.
Arxanas
It was pretty good, but you’ll notive that if you click to win and then click next level on level 5, then it’ll still keep going up (even though you’ve only got five levels!)
And I noticed your logo on the side of the page – maybe you could include a bit more of the face, and make the grey part transparent.
Joe
Your over simplification of the process hurts, yet it makes complete sense. Haha, have you thought about a multilayer scope for this design?
Vorxio
Hi,
I’m developing my *first* FLASH (8 + AS2) game
(for the next one, I’ll try to switch to CS3 + AS3)
I give you other suggestions (you probably (well) know them). The game skeleton should include:
- SHOW HISCORE (from main menu)
- GAME PAUSED (from THE GAME)
- GAME COMPLETED (from LEVEL PASSED if
all the levels have been completed)
- GAME OVER screen (after one or more
LEVEL FAILED if the game has a classic “N lives”
mechanism)
- SEND HISCORE (from GAME OVER or GAME COMPLETED)
Some of these “states” can perhaps be represented
simply by adding dedicated layers with
one MC (e.g. a “PAUSE press P to continue”
text showed when the game enter the GAME PAUSED state).
Thank you for your great site!
Vor
Gregory
Nice. I wish I’d done something like this before starting my game.
Is it just me or people here being a teensy bit demanding?
Anyone got any bright ideas for managing audio and on screen actionscript generated anims when changing game states? Im thinking of running through an array of objects and hiding/killing/pausing them as need be. This could be a way to do the game pause that @vorxio mentioned. Seems I should have a ‘pause’,'start’, ‘hide’ and ‘kill’ method in every object created.
Criando a estrutura de um jogo em flash – 3ª parte « Tentativa de Programação
[...] voltando, na segunda etapa eu antecipei-me um pouco e fiz coisas que pelo guia do Feronato seriam feitas só na parte 3, por exemplo as conexões de quase todas as telas com o menu inicial.. [...]
annleee
Hi, I have a question about the coding in level_selection.as. I cannot find where did you create main_menu_button. I can only find main_menu.
Please help!