STEP 04 the script OBJECT


Next, I'm going to present a special object. I call this the Script object. The Script object will contain most of your ActionScripts and variables. Think of it as the master control for the entire movie. Putting all your actions and variables in one place makes it easy to find and fix programming mistakes.

The interesting thing about a script object is that it contains no graphics at all. It is simply a series of labels and frame scripts in an empty movie clip. Yet, it is still placed on the screen and must be there for every frame of the main Timeline.

creating the script object

Follow these steps to create the Script object:

  1. Insert a new layer at the top of your layers and label it Scripts.

  2. Choose Insert < New Symbol (Ctrl-F8 / Cmd-F8) and select Movie Clip as its behavior. Name the symbol Scripts.

    After the symbol is created, Flash automatically opens the Symbol Editor; no object or graphic is placed on the Scripts stage, however. All the work is inserted as an action.

  3. Double-click the first keyframe to open the Frame Properties dialog and select the Actions panel.

  4. Choose the Add Action button and click Stop. Close the Frame Properties dialog.

    You must place a Stop action on the first keyframe to prevent these scripts from automatically playing. All scripts in this Timeline will be explicitly called in your buttons and will not act as frame actions (see figure 08:19).


    Figure 08:19.

    graphics/08fig19.jpg




Flash Web Design The Art Of Motion Graphics
Flash Web Design oder: the art of motion graphics
ISBN: 3827256623
EAN: 2147483647
Year: 2005
Pages: 192

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net