在alpha:1和alpha:0之间交换2个动画片段的问题

时间:2013-09-24 20:29:40

标签: actionscript alpha tweenlite

我有一个脚本,当你点击箭头时,第二个项目变得可见,第一个变为不可见,这继续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});

}
}

0 个答案:

没有答案