Createemptymovieclip (Movieclip.createemptymovieclip Method) - MACROMEDIA FLASHLITE2 ACTIONSCRIPT-LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

An example is also in the drawingapi.fla file in the ActionScript samples folder. The following
list gives typical paths to this folder:
Windows: boot drive\Program Files\Macromedia\Flash 8\Samples and
Tutorials\Samples\ActionScript
Macintosh: Macintosh HD/Applications/Macromedia Flash 8/Samples and Tutorials/
Samples/ActionScript
See also
lineStyle (MovieClip.lineStyle method)
createEmptyMovieClip
(MovieClip.createEmptyMovieClip method)
public createEmptyMovieClip(name:String, depth:Number) : MovieClip
Creates an empty movie clip as a child of an existing movie clip. This method behaves
similarly to the
attachMovie()
identifier for the new movie clip. The registration point for a newly created empty movie clip
is the upper-left corner. This method fails if any of the parameters are missing.
You can extend the methods and event handlers of the MovieClip class by creating a subclass.
Availability: ActionScript 1.0; Flash Lite 2.0
Parameters
- A string that identifies the instance name of the new movie clip.
name:String
- An integer that specifies the depth of the new movie clip.
depth:Number
Returns
- A reference to the newly created movie clip.
MovieClip
Example
The following example creates an empty MovieClip named
TextField inside of it, and then sets the new
var container:MovieClip = this.createEmptyMovieClip("container",
this.getNextHighestDepth());
var label:TextField = container.createTextField("label", 1, 0, 0, 150, 20);
label.text = "Hello World";
See also
attachMovie (MovieClip.attachMovie method)
454
ActionScript classes
method, but you don't need to provide an external linkage
TextField.text
, creates a new
container
property.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASHLITE2 ACTIONSCRIPT-LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash lite 2

Table of Contents