Example
The following example creates a movie clip 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;
};
See also
_x (MovieClip._x property)
(MovieClip._yscale property)
box_mc
,
_y (MovieClip._y property)
,
_width (MovieClip._width property)
at runtime. The Drawing API is
,
_yscale
MovieClip
525
Need help?
Do you have a question about the FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE and is the answer not in the manual?