Movieclip._Xscale - MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

MovieClip._xscale

Availability
Flash Player 4.
Usage
my_mc._xscale:Number
Description
Property; determines the horizontal scale (
registration point of the movie clip. The default registration point is (0,0).
Scaling the local coordinate system affects the
whole pixels. For example, if the parent movie clip is scaled to 50%, setting the
an object in the movie clip by half the number of pixels as it would if the movie were set at 100%.
Example
The following example creates a movie clip at runtime called
draw a box in this instance, and when the mouse rolls over the box, horizontal and vertical scaling
is applied to the movie clip. When the mouse rolls off the instance, it returns to the previous
scaling.
this.createEmptyMovieClip("box_mc", 1);
box_mc._x = 100;
box_mc._y = 100;
with (box_mc) {
lineStyle(1, 0xCCCCCC);
beginFill(0xEEEEEE);
moveTo(0, 0);
lineTo(80, 0);
lineTo(80, 60);
lineTo(0, 60);
lineTo(0, 0);
endFill();
}
box_mc.onRollOver = function() {
this._x -= this._width/2;
this._y -= this._height/2;
this._xscale = 200;
this._yscale = 200;
};
box_mc.onRollOut = function() {
this._xscale = 100;
this._yscale = 100;
this._x += this._width/2;
this._y += this._height/2;
};
See also
MovieClip._x, MovieClip._y,
596
Chapter 2: ActionScript Language Reference
) of the movie clip as applied from the
percentage
and
_x
_y
MovieClip._yscale
property settings, which are defined in
_x
. The Drawing API is used to
box_mc
property moves

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

This manual is also suitable for:

Flash mx

Table of Contents