03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

triangle.onRollOut = function() {<br />

this._alpha = 100;<br />

};<br />

See also<br />

_alpha (Button._alpha property), _alpha (TextField._alpha property), _visible<br />

(MovieClip._visible property)<br />

attachMovie (MovieClip.attachMovie method)<br />

public attachMovie(id:String, name:String, depth:Number,<br />

[initObject:Object]) : MovieClip<br />

Takes a symbol from the library <strong>and</strong> attaches it to the movie clip. Use<br />

MovieClip.removeMovieClip() or MovieClip.unloadMovie() to remove a SWF file<br />

attached with attachMovie().<br />

You can extend the methods <strong>and</strong> event h<strong>and</strong>lers of the MovieClip class by creating a subclass.<br />

Parameters<br />

id:String - The linkage name of the movie clip symbol in the library to attach to a movie<br />

clip on the Stage. This is the name entered in the Identifier field in the Linkage Properties<br />

dialog box.<br />

name:String - A unique instance name for the movie clip being attached to the movie clip.<br />

depth:Number - An integer specifying the depth level where the SWF file is placed.<br />

initObject:Object [optional] - (<strong>Support</strong>ed for Flash Player 6 <strong>and</strong> later) An object<br />

containing properties with which to populate the newly attached movie clip. This parameter<br />

allows dynamically created movie clips to receive clip parameters. If initObject is not an<br />

object, it is ignored. All properties of initObject are copied into the new instance. The<br />

properties specified with initObject are available to the constructor function.<br />

Returns<br />

MovieClip - A reference to the newly created instance.<br />

Example<br />

The following example attaches the symbol with the linkage identifier "circle" to the movie<br />

clip instance, which is on the Stage in the SWF file:<br />

this.attachMovie("circle", "circle1_mc", this.getNextHighestDepth());<br />

this.attachMovie("circle", "circle2_mc", this.getNextHighestDepth(),<br />

{_x:100, _y:100});<br />

MovieClip 409

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!