当前位置: 动力学知识库 > 问答 > 编程问答 >

actionscript 3 - Invert the y axis in my 3D rotating menu (as3)

问题描述:

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;
分享给朋友:
您可能感兴趣的文章:
随机阅读: