Working With Scenes - Adobe 38039336 - Flash CS3 Professional User Manual

User guide
Hide thumbs Also See for 38039336 - Flash CS3 Professional:
Table of Contents

Advertisement

This becomes the controlling Timeline.
2
In the Actions panel (Window > Actions), go to the Actions toolbox on the left, and select an action or method
that requires a target path.
Click the parameter box or location in the script where you want to insert the target path.
3
4
Enter an absolute or relative target path in the Actions panel.
Use an expression as a target path
1
Select the movie clip, frame, or button instance to which you want to assign the action.
This becomes the controlling Timeline.
In the Actions panel (Window > Actions), go to the Actions toolbox on the left, and select an action or method
2
that requires a target path.
3
Do one of the following:
• Enter an expression that evaluates to a target path in a parameter box.
• Click to place the insertion point in the script. Then, in the Functions category of the Actions toolbox, double-
click the
function. The
targetPath
• Click to place the insertion point in the script. Then, in the Functions category of the Actions toolbox, select the
function. The
eval
eval
as
.
play
The following script assigns the value 1 to the variable
movie clip instance and assigns it to the variable
call the MovieClip object methods.
0i = 1;
0x = eval("mc"+i);
0x.play();
0// this is equivalent to mc1.play();
You can also use the
eval
0eval("mc" + i).play();

Working with scenes

About scenes
To organize a document thematically, you can use scenes. For example, you might use separate scenes for an intro-
duction, a loading message, and credits. Though using scenes has some disadvantages, there are some situations in
which few of these disadvantages apply, such as when you create lengthy animations. When you use scenes, you avoid
having to manage a large number of FLA files.
targetPath
function converts a string to a movie clip reference that can be used to call methods such
. The variable
x
function to call methods directly, as shown in the following example:
function converts a reference to a movie clip into a string.
. It then uses the
i
eval
is now a reference to a movie clip instance and can
x
function to create a reference to a
FLASH CS3
75
User Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash cs3 professional

Table of Contents