我有一個圓形菜單,每旋轉90度左右leftArrow_mc被點擊,但在270度時按鈕停止工作。將度數重設爲0也可以爲我做任何事情嗎?完全以90度間隔旋轉
import com.greensock.*;
import com.greensock.easing.*;
leftArrow_mc.addEventListener(MouseEvent.CLICK, rotateLeft1);
function rotateLeft1(event: MouseEvent):void {
if (bottomWheel_menu_mc.rotation==0) {
TweenLite.to(bottomWheel_menu_mc, 1, {rotation: 90, ease:Bounce.easeOut});
} else if (bottomWheel_menu_mc.rotation == 90) {
TweenLite.to(bottomWheel_menu_mc, 1, {rotation: 180, ease:Bounce.easeOut});
} else if (bottomWheel_menu_mc.rotation == 180) {
TweenLite.to(bottomWheel_menu_mc, 1, {rotation: 270, ease:Bounce.easeOut});
} else if (bottomWheel_menu_mc.rotation == 270) {
TweenLite.to(bottomWheel_menu_mc, 1, {rotation: 360, ease:Bounce.easeOut});
}
else if (bottomWheel_menu_mc.rotation == 360) {
bottomWheel_menu_mc.rotation == 0
}
}
應注意:如果答案可以幫助解決你的問題,你應該接受的答案,或者人們將不太可能幫助你.. – joshua