![MACROMEDIA FLASH 8-FLASH Скачать руководство пользователя страница 241](http://html2.mh-extra.com/html/macromedia/flash-8-flash/flash-8-flash_tutorials-manual_3348958241.webp)
Play a movie clip 241
Next, you’ll specify what the function does: it plays the movie clip on
the root Timeline, which is the main timeline. In your script, you’ll
refer to the movie clip by the linkage identifier name in the Linkage
Properties dialog box (MCTrio).
Additionally, even though you didn’t place an instance of the MCTrio
symbol on the Stage, you’ll use ActionScript to create an instance name
for the symbol. The instance name that you’ll specify is trio_mc.
3.
With the insertion point at the end of the last line of script, press Enter
or Return. Then type the following:
this._parent.attachMovie("MCTrio", "trio_mc", 1);
The number 1 in the script that you just typed refers to the depth on
the layer in which to play the movie clip.
Every movie clip instance has its own
z
axis (depth) that determines the
stacking order of a movie clip within its parent SWF file or movie clip.
When you use the
attachMovie()
method to create a new movie clip
at runtime, you always specify a depth for the new clip as a method
parameter.
Specify movie clip Stage coordinates
In addition to the
z
axis for the movie clip, you must specify the
x
and
y
coordinates to place the movie clip within the Stage area at runtime.
■
Press Enter (Windows) or Return (Macintosh) after the last line in the
Script pane and type the following:
trio_mc._x = 275;
trio_mc._y = 200;
};
NO
TE
For more information about the
attachMovie()
method, see
attachMovie()
in the
ActionScript 2.0 Language Reference
. Additionally,
you can use the
ActionScript 2.0 Language Reference
for information
about ActionScript that allows you to manage depth;
getNextHighestDepth()
,
getDepth()
,
getInstanceAtDepth()
are
methods of the MovieClip class. The DepthManager class allows you to
manage the relative depth assignments of a movie clip.
Содержание FLASH 8-FLASH
Страница 1: ...Flash Tutorials...
Страница 10: ...10 Contents...
Страница 12: ...12 Introduction...
Страница 42: ...42 Basic Tasks Creating a banner Part 1...
Страница 78: ...78 Basic Tasks Creating a banner Part 3...
Страница 88: ...88 Basic Tasks Create Accessible Flash Content...
Страница 106: ...106 Basic Tasks Create an Application...
Страница 116: ...116 Basic Tasks Use Layout Tools...
Страница 124: ...124 Basic Tasks Create Symbols and Instances...
Страница 134: ...134 Basic Tasks Add Button Animation and Navigation...
Страница 144: ...144 Basic Tasks Create a Presentation with Screens Flash Professional Only...
Страница 192: ...192 Creating Graphics Applying Gradients...
Страница 198: ...198 Creating Graphics Apply Graphic Filters and Blends Flash Professional Only...
Страница 224: ...224 ActionScript Use Script Assist mode...
Страница 268: ...268 ActionScript Work with Objects and Classes...
Страница 270: ...270 Data Integration Overview Flash Professional Only...