Copy link to clipboard
Copied
Hello:
I have this movie clip on stage (dsp), which I would like to keep rotating horizontally. With the following script it rotates in circular mode from left to right, but not horizontally (left to right or vice versa). How do I rotate it horizontally?
dsp.addEventListener(Event.ENTER_FRAME, rotateHorizontal);
function rotateHorizontal(event:Event): void
{
dsp.rotation += 0.5;
}
Thanks in advance
German
then you probably want to use the rotationY property. there are also rotationX and rotationZ properties you should check.
Copy link to clipboard
Copied
are you using flash cs4 and publishing for fp 10?
Copy link to clipboard
Copied
Kglad:
Yes, I'm using CS4 and publishing for flash player 10.
German
Copy link to clipboard
Copied
then you probably want to use the rotationY property. there are also rotationX and rotationZ properties you should check.
Copy link to clipboard
Copied
Kglad:
Thanks! It's I what needed. To rotate right to left I used + speed and - speed for right to left, The final script is as follows:
var speed:int = 2;
dsp.addEventListener("enterFrame", rotateHorizontal);
function rotateHorizontal (event:Event):void {
dsp.rotationY -= speed;
}
Thanks again.
German
Copy link to clipboard
Copied
you're welcome.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more