Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 4 down vote accepted

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'?

share|improve this answer
+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. – Allan Feb 23 '11 at 7:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.