actionscript - Issues with swapping 2 movieclips between alpha:1 and alpha:0 -
i have script when click arrow, 2nd item becomes visible , 1st goes invisible, goes on 4 items , on fourth goes first item etc. code isnt doing though, on first click 1st item remains , on second click 3rd , 1st item still visible, on 4th 4th item , 1st visible, after 4th click works fine. can me figure out?
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}); } }
Comments
Post a Comment