i need a gray button, once i click on it, change to blue, click again, change back to gray.
so i have two frames and the instant name:showerhead1_mc
the problem is, it change from gray to blue when click on it, but couldn’t change from blue to gray when click on it again.
this is the code:
stop();
var i:int= 1;
showerhead1_mc.addEventListener(MouseEvent.CLICK,onClick);
function onClick(event:MouseEvent): void
{if (i==1)
{
gotoAndStop(2);
}
else
{
gotoAndStop(1);
}
}