EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Width (Movieclip._Width Property)

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
938 ActionScript classes
Example
The following example sets the
_visible property for two movie clips called myMC1_mc and
myMC2_mc. The property is set to true for one instance, and false for the other. Notice that
myMC1_mc instance cannot be clicked after the _visible property is set to false.
myMC1_mc.onRelease = function() {
trace(this._name+"._visible = false");
this._visible = false;
};
myMC2_mc.onRelease = function() {
trace(this._name+"._alpha = 0");
this._alpha = 0;
};
See also
_visible (Button._visible property), _visible (TextField._visible property)
_width (MovieClip._width property)
public _width : Number
The width of the movie clip, in pixels.
Availability: ActionScript 1.0; Flash Player 4
Example
The following code example displays the height and width of a movie clip in the Output
panel:
this.createEmptyMovieClip("triangle", this.getNextHighestDepth());
triangle.beginFill(0x0000FF, 100);
triangle.moveTo(100, 100);
triangle.lineTo(100, 150);
triangle.lineTo(150, 100);
triangle.lineTo(100, 100);
trace(triangle._name + " = " + triangle._width + " X " + triangle._height +
" pixels");
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
_height (MovieClip._height property)

Table of Contents

Related product manuals