问题描述:

I got the problem where I have made this 3D rotating menu. My code look like this.

import flash.events.Event;

addEventListener(Event.ENTER_FRAME, onEnterFrame);

function onEnterFrame(event:Event):void

{

anim.rotationX += ((stage.mouseY - stage.stageHeight/2)-anim.rotationX*20) * 0.009;

anim.rotationY += ((stage.mouseX - stage.stageWidth/4)-anim.rotationY*20) * 0.009;

}

but I dont know how to make the y axis inverted, so the movieclip moves opposite at the y-axis

can anyone help?

网友答案:

Change this line:

anim.rotationY += ((stage.mouseX - stage.stageWidth/4)-anim.rotationY*20)  * 0.009;

To:

anim.rotationY -= ((stage.mouseX - stage.stageWidth/4)-anim.rotationY*20)  * 0.009;
相关阅读:
Top