• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Preparing the Movie

We've already created the basic shell of the movie, which is located on the CD included with this book. We assumed you could do this yourself but we did it for you. Begin by taking a few moments to look over the movie, and then, in this lesson, you'll finish setting it up, so you can begin the primary development.

Open dante_quiz.fla.

This file is already in your site, in the dante/flash folder.

Review the timeline, stage, and Library.

Notice that the movie is divided into five sections. If you move the frame indicator, you'll see that the movie is divided into five screens, with one question for each screen. You'll also notice that screens four and five are completed, both in terms of the interface and the ActionScript attached to Frames 30 and 40 in the actions layer.

The Library already contains a number of assets, including: the Button and RadioButton components. Also in the Library is a movie clip called warningDialog, which is a generic error message that you'll instantiate and program later in this lesson.

Click Frame 1 of the actions layer, and press F9 to open the Actions panel.

There is no script at this point, but that's all about to change.

Type the following code in the Actions panel:

Enables us to access the ActionScript for components using just their names (e.g., Button), as opposed to their full pathnames (e.g., mx.controls.Button). It also activates code hints.
import mx.controls.RadioButtonGroup;
import mx.controls.Button;
Initializes the movie; that is, it sets the movie's begin state.
* It stops the movie on the first frame.


As you have probably guessed, everything inside the /* and */ is a comment. Flash ignores comments, but they are useful for readers, including yourself, in the event you forget how a section of code works. You can skip the step of entering the comments, but documenting your code is an important practice.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint