3.
In the Actions toolbox (at the left of the panel), select an action or method that requires a
target path.
4.
Click the parameter box or location in the script where you want to insert the target path.
5.
Click the Insert Target Path button above the Script pane.
6.
In the Insert Target Path dialog box, select a syntax: Dots (the default) or Slashes.
7.
Select Absolute or Relative for the target path mode.
For more information, see
8.
Select a movie clip in the Insert Target Path display list.
9.
Click OK.
To insert a target path manually:
Follow steps 1–4 and enter an absolute or relative target path in the Actions panel.
To use an expression as a target path:
1.
Follow steps 1–3.
2.
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
The
targetPath
Click to place the insertion point in the script. Then, in the Functions category of the
Actions toolbox, select the
The
function converts a string to a movie clip reference that can be used to call
eval
methods such as
play
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();
42
Working with Flash Documents
"Using absolute and relative target paths" on page
targetPath
function converts a reference to a movie clip into a string.
function.
eval
.
function to call methods directly, as shown in the following
eval
function.
. It then uses the
i
. The variable
x
39.
function to
eval
is
x
Need help?
Do you have a question about the FLASH 8-USING FLASH and is the answer not in the manual?