Hello!
I am using the following code for a set of buttons that when one is clicked it deactivates the active button, if one is active:
var btns:Array = [btn1, btn2, btn3, btn4];
btn1.onRelease = btn2.onRelease = btn3.onRelease = btn4.onRelease = function(){
activeBtn(this);
}
function activeBtn(mc:MovieClip):Void{
for(var i:Number=0; i<btns.length; i++){
if(btns*!=mc){
btns*.gotoAndStop("rest");
}else{
btns*.gotoAndStop("over");
}
}
}
What I am looking to do is to add on to the code that I am already using which does part of what I want (when one button is active and you click on another button it ‘deactivates’ the currently active button so there is only one active button at a time…).
I just need to add a rollover effect to that code somehow so it wont cancel what it already does…
Any help would be greatly appreciated! Thanks.
Attached is a test file for anyone to look at.