MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH Manual page 365

Learning actionscript 2.0 in flash
Table of Contents

Advertisement

6.
Select Edit > Edit Document to return to the main Timeline.
7.
Select the movie clip symbol in the library, and select Linkage from the Library pop-up
menu.
The Linkage Properties dialog box appears.
8.
Select the Export for ActionScript option, and Export in first frame.
9.
Type dynamic_id into the Indentifier text box, and click OK.
10.
Select the first frame of the main Timeline, and add the following code to the Actions
panel's Script pane:
/* Attaches a new movie clip and moves it to an x and y coordinate of 50
*/
this.attachMovie("dynamic_id", "newClip_mc", 99, {name_str:"Erick",
_x:50, _y:50});
11.
Test the Flash document(Control > Test Movie).
The name you specified in the
text field.
You can find a sample photo gallery application on your hard disk.This file provides an
example of how to use ActionScript to control movie clips dynamically while loading image
files into a SWF file, which includes creating movie clips at runtime. You can find the sample
source file, gallery_tween.fla, in the Samples folder on your hard disk.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and
Tutorials\Samples\ActionScript\Galleries.
On the Macintosh, browse to Macintosh HD/Applications/Macromedia Flash 8/Samples
and Tutorials/Samples/ActionScript/Galleries.
For an example source file that creates and removes numerous movie clips at runtime, you can
find a sample source file, animation.fla, in the Samples folder on your hard disk
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and
Tutorials\Samples\ActionScript\Animation.
On the Macintosh, browse to Macintosh HD/Applications/Macromedia Flash 8/Samples
and Tutorials/Samples/ActionScript/Animation.
call appears inside the new movie clip's
attachMovie()
Adding parameters to dynamically created movie clips
365

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents