|
Deconstruct the first scene
The first scene of the sample movie contains a Start button that users must click before they can use the keyboard controls. This strategy prevents potential browser problems.
When a Flash movie plays inside a browser window, the browser may try to intercept the user's keypresses unless the user has clicked the Flash movie. Clicking the movie transfers the keypress focus (the ability to intercept keypresses) from the browser to the Flash Player. One way to get users to click a movie is by including a Start button.
Here you'll examine how the first scene of the movie was put together.
| 1 |
In Flash, choose File > Open. Navigate to the keyobject.fla file and click Open. |
| 2 |
Open the Library, if it is not already open, by choosing Window > Library.
 |
| 3 |
Open the Scenes panel, if it is not already open, by choosing Window > Panels > Scene.
 |
|
The movie consists of two scenes. |
| 4 |
In the Scenes panel, select the Start scene.
 |
|
The Start scene is the first scene of the movie. The second scene (Game) does not play until the user clicks the Start button. This strategy was implemented by assigning a Stop action to Frame 1 of the Stop Action layer and by assigning actions to the Start button that allow the movie to proceed when the user clicks the button. |
| 5 |
On the Stage, click the Start button. Open the Actions panel, if it is not already open, by choosing Window > Actions.
 |
|
Examine the actions: |
|
on (release) {
nextFrame ();
}
|
|
These actions tell the Flash movie that after the user releases the mouse button, the movie should proceed to the next frame. The next frame is the first frame of the Game scene. |
 |
|
In the next section, you'll deconstruct the Game scene.
|