0

我有一个脚本,当您单击箭头时,第二项变为可见,而第一项变为不可见,这持续了 4 项,然后在第四项返回到第一项等。但代码并没有这样做,在第一次单击第一个项目仍然存在,第二次单击第三个和第一个项目仍然可见,第四次单击第四个项目和第一个项目可见,然后在第四次单击后一切正常。有人可以帮我解决这个问题吗?

getting_started.alpha = 1;
building_your_site.alpha = 0;
web_enhancement.alpha = 0;
site_maintenance.alpha = 0;

leftArrow_mc.addEventListener(MouseEvent.CLICK, rotateLeft);

function rotateLeft(event: MouseEvent):void
{

if (bottomWheel_menu_mc.rotation == 0)
{

    TweenLite.to(getting_started, 1, {alpha:0});
    TweenLite.to(site_maintenance, 1, {alpha:1});


}
else if (bottomWheel_menu_mc.rotation == 90)
{

    TweenLite.to(site_maintenance, 1, {alpha:0});
    TweenLite.to(web_enhancement, 1, {alpha:1});

}
else if (bottomWheel_menu_mc.rotation == 180)
{


    TweenLite.to(web_enhancement, 1, {alpha:0});
    TweenLite.to(building_your_site, 1, {alpha:1});

}
else if (bottomWheel_menu_mc.rotation == -90)
{

    TweenLite.to(building_your_site, 1, {alpha:0});
    TweenLite.to(getting_started, 1, {alpha:1});

}
else if (bottomWheel_menu_mc.rotation == -180)
{

    TweenLite.to(web_enhancement, 1, {alpha:0});
    TweenLite.to(building_your_site, 1, {alpha:1});

}
}
4

0 回答 0