I am starting a new Flash game and I was wondering if there is a better way to organize the timeline of the project. In my previous games I define a keyframe for each possible status of the game (loading, sponsor, intro, menu, gameplay, etc...). This method works but has some problems... For instance, it is not easy to implement transitions between the different screens in the game.

How do you do this? Do you know of some better way?


1 Answer 1


The most flexible way is to skip the keyframes altogether and implement your states (and transitions) in code. You could have a basic GameState class that inherits from MovieClip and can therefore be applied to MovieClips in your Library.

This wikipedia article might help you understand the concept of a State-Machine. Also have a look at the following question: Game State 'Stack'?

  • 1
    \$\begingroup\$ +1 @miguelSantirso - as bummzack says, forget keyframes and instead think of stacking DisplayObjects on top of other DisplayObjects, hiding and showing the layers as necessary. Your menu will be on top of your game container etc. You might want to also think about using an engine like the PushButton engine to help organise and structure everything. \$\endgroup\$
    – Allan
    Commented Feb 23, 2011 at 7:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .