830
ActionScript classes
Parameters
id
:String
- The linkage name of the movie clip symbol in the library to attach to a movie
clip on the Stage. This is the name that you enter in the Identifier field in the Linkage
Properties dialog box.
name
:String
- A unique instance name for the movie clip being attached to the movie clip.
depth
:Number
- An integer specifying the depth level where the SWF file is placed.
initObject
:Object
[optional] - (Supported for Flash Player 6 and later) An object that
contains properties with which to populate the newly attached movie clip. This parameter
allows dynamically created movie clips to receive clip parameters. If
initObject
is not an
object, it is ignored. All properties of
initObject
are copied into the new instance. The
properties specified with
initObject
are available to the constructor function.
Returns
MovieClip
- A reference to the newly created instance.
Example
The following example attaches the symbol with the linkage identifier
circle
to the movie
clip instance, which is on the Stage in the SWF file:
this.attachMovie("circle", "circle1_mc", this.getNextHighestDepth());
this.attachMovie("circle", "circle2_mc", this.getNextHighestDepth(),
{_x:100, _y:100});
The
MovieClip.getNextHighestDepth()
method used in this example requires Flash Player
7 or later. If your SWF file includes a version 2 component, use the version 2 components
DepthManager class instead of the
MovieClip.getNextHighestDepth()
method.
See also
removeMovieClip (MovieClip.removeMovieClip method)
,
unloadMovie
(MovieClip.unloadMovie method)
,
removeMovieClip function
beginBitmapFill (MovieClip.beginBitmapFill method)
public beginBitmapFill(bmp:BitmapData, [matrix:Matrix], [repeat:Boolean],
[smoothing:Boolean]) : Void
Fills a drawing area with a bitmap image. The bitmap can be repeated or tiled to fill the area.
Availability:
ActionScript 1.0; Flash Player 8
Parameters
bmp
:flash.display.BitmapData
- A transparent or opaque bitmap image.
Содержание FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Страница 1: ...ActionScript 2 0 Language Reference ...
Страница 1352: ...1352 ActionScript classes ...