![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
To create an empty movie clip on the Stage, use the createEmptyMovieClip()
method of the MovieClip class. This method creates a movie clip as a child of the clip that calls the method. The registration point for a newly created empty movie clip is the upper left corner.
For example, the following code creates a new child movie clip named new_mc
at a depth of 10 in the movie clip named parent_mc
.
parent_mc.createEmptyMovieClip("new_mc", 10);
The following code creates a new movie clip named canvas_mc
on the root Timeline of the SWF file in which the script is run, and then invokes loadMovie()
to load an external JPEG file into itself.
_root.createEmptyMovieClip("canvas_mc", 10); canvas_mc.loadMovie("flowers.jpg");
For more information, see MovieClip.createEmptyMovieClip()
.
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |