Yscale (Movieclip._Yscale Property) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

See also
,
Mouse
_xmouse (MovieClip._xmouse property)

_yscale (MovieClip._yscale property)

public _yscale :
Sets the vertical scale (
the movie clip. The default registration point is (0,0).
Scaling the local coordinate system affects the
in whole pixels. For example, if the parent movie clip is scaled to 50%, you set the
to move an object in the movie clip by half the number of pixels that it would if the movie
were at 100%.
Availability: ActionScript 1.0; Flash Lite 2.0
Example
The following example creates a movie clip at runtime called
used to 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;
};
Number
) of the movie clip as applied from the registration point of
percentage
and
property settings, which are defined
_x
_y
box_mc
property
_x
. The Drawing API is
MovieClip
527

Advertisement

Table of Contents
loading

Table of Contents