Multiframe+Games


 * The purpose of this page is to describe the overall organization of a multiframe game - one that has a menu at first, the game itself, and a "game over" screen. We will presume that the main flash file for the game itself is called "MainGame.as" for this example.**


 * How many frames should such a Flash file have, and what should each contain?**

3 Frames. 1 for the start, 1 for the game itself, and 1 game for game over


 * What layers should the Flash File have (at least)?**

Score Actions Buttons Game Layer


 * How do you prevent the File from just playing frames 1,2,3,1,2,3,1,2,3 over and over?**

Go to actions in the first frame and tell it to Stop. In each window of each frame you should do this.


 * How do you make the MainGame.as file only associate with the frame for the game, rather than with the whole Main movie?**

When on a specific Frame such as frame 2, Select all and go to Modify convert to Symbol and give it a name


 * How do you tell a "Play Game" button on the first screen to make the movie go to the frame with the game on it?**

Under the actions for frame 1, tell Play Game button to start playing the game by creating a function "startPlaying(mEvt: MouseEvent)"


 * Inside the MainGame.as class, how do you tell the computer to stop the game and advance to the "Game Over" screen?**

In the Asteroid.as tell the MainGame.as to go to and stop


 * Suppose you have a textField in the main .fla file called "scoreField." Inside the MainGame.as class, how would you tell the "scoreField" to change its text to something else?**

make a dynamic text field on all three fields. In the first and second frame's actions, make this frames visible value be false, but in the third frames actions (gameOver frame) make it visible.