![](/img/trans.png)
[英]How to put constant 3d rotation of a movieclip into a loop on the Y axis in AS3
[英]Invert the y axis in my 3D rotating menu (as3)
我遇到了制作這個3D旋轉菜單的問題。 我的代碼看起來像這樣。
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;
}
但是我不知道如何使y軸反轉,所以movieclip在y軸上相反
有人可以幫忙嗎?
改變這一行:
anim.rotationY += ((stage.mouseX - stage.stageWidth/4)-anim.rotationY*20) * 0.009;
至:
anim.rotationY -= ((stage.mouseX - stage.stageWidth/4)-anim.rotationY*20) * 0.009;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.