Rotation (Movieclip._Rotation 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

Example
Each time you click a button in the following example, you attach a movie clip instance to the
Stage in a random position. When you click a movie clip instance, you remove that instance
from the SWF file.
function randRange(min:Number, max:Number):Number {
var randNum:Number = Math.round(Math.random()*(max-min))+min;
return randNum;
}
var bugNum:Number = 0;
addBug_btn.onRelease = addBug;
function addBug() {
var thisBug:MovieClip = this._parent.attachMovie("bug_id",
"bug"+bugNum+"_mc", bugNum,
{_x:randRange(50, 500), _y:randRange(50, 350)});
thisBug.onRelease = function() {
this.removeMovieClip();
};
bugNum++;
}
See also
duplicateMovieClip function
(MovieClip.createEmptyMovieClip method)
(MovieClip.duplicateMovieClip method)
,
method)
swapDepths (MovieClip.swapDepths method)

_rotation (MovieClip._rotation property)

public _rotation :
Specifies the rotation of the movie clip, in degrees, from its original orientation. Values from 0
to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise
rotation. Values outside this range are added to or subtracted from 360 to obtain a value
within the range. For example, the statement
my_mc._rotation = 90
Availability: ActionScript 1.0; Flash Lite 2.0
510
ActionScript classes
,
createEmptyMovieClip
Number
.
,
duplicateMovieClip
,
attachMovie (MovieClip.attachMovie
my_mc._rotation = 450
is the same as

Advertisement

Table of Contents
loading

Table of Contents