Working With Scenes - MACROMEDIA FLASH MX 2004-USING FLASH Use Manual

Hide thumbs Also See for FLASH MX 2004-USING FLASH:
Table of Contents

Advertisement

The following script assigns the value 1 to the variable
create a reference to a movie clip instance and assigns it to the variable
now a reference to a movie clip instance and can call the MovieClip object methods.
i = 1;
x = eval("mc"+i);
x.play();
// this is equivalent to mc1.play();
You can also use the
example:
eval("mc" + i).play();

Working with scenes

To organize a document thematically, you can use scenes. For example, you might use separate
scenes for an introduction, a loading message, and credits.
Note: You cannot use scenes in a screen-based document. For information on screens, see
Chapter 12, "Working with Screens (Flash Professional Only)," on page
When you publish a Flash document that contains more than one scene, the scenes in the
document play back in the order they are listed in the Scene panel in the Flash document. Frames
in the document are numbered consecutively through scenes. For example, if a document
contains two scenes with ten frames each, the frames in Scene 2 are numbered 11–20.
You can add, delete, duplicate, rename, and change the order of scenes.
To stop or pause a document after each scene, or to let users navigate the document
in a nonlinear fashion, you use actions. For more information, see Chapter 2, "ActionScript
Basics," in Using ActionScript in Flash.
To display the Scene panel:
Select Window > Design Panels > Scene.
To view a particular scene:
Select View > Go To and then select the name of the scene from the submenu.
To add a scene:
Click the Add Scene button in the Scene panel.
Select Insert > Scene.
To delete a scene:
Click the Delete Scene button in the Scene panel.
To change the name of a scene:
Double-click the scene name in the Scene panel and enter the new name.
To duplicate a scene:
Click the Duplicate Scene button in the Scene panel.
function to call methods directly, as shown in the following
eval
. It then uses the
i
eval
. The variable
x
215.

Working with scenes

function to
is
x
27

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents