I am creating a spinning thumbnail machine that projects the thumbnail on a larger viewing screen. When you click the button for that wheel it turns with gears ect to the next thumb. I have that worked out, but want to disable the button during mc rotation so it can not be clicked multiple times the second or two the wheel is turning to the next thumb. Any ideas? Below is the script for one wheel and gears. That all works, just want to know how to disable the button during rotation.
Thanks for any help.
if(event.target == button1) {
var turnTween:Tween = new Tween(Rotory_Mc, "rotation", Strong.easeOut, currentRot+Rotory_Mc.rotation, currentRot+Rotory_Mc.rotation+22.3, 1, true);
var turnTweenCG:Tween = new Tween(CenterGear_Mc, "rotation", Strong.easeOut, currentCGRot+CenterGear_Mc.rotation, currentCGRot+CenterGear_Mc.rotation+22.3, 1, true);
var turnTweenSG:Tween = new Tween(SecondGear_Mc, "rotation", Strong.easeOut, currentSGRot+SecondGear_Mc.rotation, currentSGRot+SecondGear_Mc.rotation-22.0, 1, true);
var turnTweenSG2:Tween = new Tween(SecondGear2_Mc, "rotation", Strong.easeOut, currentSG2Rot+SecondGear2_Mc.rotation, currentSG2Rot+SecondGear2_Mc.rotation+22.0, 1, true);
var turnTweenLG:Tween = new Tween(LargeGear_Mc, "rotation", Strong.easeOut, currentLGRot+LargeGear_Mc.rotation, currentLGRot+LargeGear_Mc.rotation+22.3, 1, true);
var turnTweenLG2:Tween = new Tween(LargeGear2_Mc, "rotation", Strong.easeOut, currentLG2Rot+LargeGear2_Mc.rotation, currentLG2Rot+LargeGear2_Mc.rotation-22.3, 1, true);
when i do stuff like that, i add what i call "roots" to my movie...
so for your situation.. i would put this piece of code on a separate layer called roots
_root.rotating = 0;
and when your movie starts, rotating will = 0.
then where your actions for your button are.. tell it that if _root.rotating = 0 then the button is clickable... else.. its not...
so then where your button tells the gears to rotate.. tell it to tell _root.rotate to = 1. and when it stops rotating.. tell it to go back to = 0 so you can click your button again...
i use this same concept to implement a pause menu in games... pretty handy. and simple.