beautypg.com

Specify target paths – Adobe Flash Professional CS3 User Manual

Page 80

background image

FLASH CS3

User Guide

74

_level0

westCoast

california

sanfrancisco

bakersfield

oregon

portland

ashland

washington

olympia

ellensburg

As on a web server, each timeline in Flash can be addressed in two ways: with an absolute path or with a relative path.
The absolute path of an instance is always a full path from a level name, regardless of which timeline calls the action;
for example, the absolute path to the instance

california

is

_level0.westCoast.california

. A relative path is

different when called from different locations; for example, the relative path to

california

from

sanfrancisco

is

_parent

, but from

portland

, it’s

_parent._parent.california

.

See also

“Structuring FLA files” on page 465

“Organizing ActionScript in an application” on page 467

Specify target paths

To control a movie clip, loaded SWF file, or button, you must specify a target path. You can specify it manually, or
by using the Insert Target Path dialog box, or by creating an expression that evaluates to a target path. To specify a
target path for a movie clip or button, you must assign an instance name to the movie clip or button. A loaded
document doesn’t require an instance name, because you use its level number as an instance name (for example,

_level5

).

Assign an instance name to a movie clip or button

1

Select a movie clip or button on the Stage.

2

Enter an instance name in the Property inspector.

Specify a target path using the Insert Target Path dialog box

1

Select the movie clip, frame, or button instance to which you want to assign the action.

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.

3

Click the parameter box or location in the script where you want to insert the target path.

4

Click the Insert Target Path button

above the Script pane.

5

Select Absolute or Relative for the target path mode.

6

Select a movie clip in the Insert Target Path display list, and click OK.

Specify a target path manually

1

Select the movie clip, frame, or button instance to which you want to assign the action.