Hi. I’ve made a function that hides a button, waits 5 seconds and turns it back on. When I run hideBtn(); for the three buttons only the first button works however the traces successfully output:
[SIZE=“1”]_level0.menuMC.homeBut
_level0.menuMC.aboutBut
_level0.menuMC.contBut[/SIZE]
I’m thinking there is a problem with the setInterval. When I run the clearInterval the first time does it ruin it for the rest of the calls?
I’m sure there is a better way of doing it. Thanks for any help.
[SIZE=“1”]function hideBtn(cp) {
var currPath = cp;
currPath._visible = false;
wait = function() {
currPath._visible = true;
clearInterval(evoClr);
}
evoClr = setInterval(wait, 5000);
trace(currPath);
}
hideBtn(this._parent.homeBut);
hideBtn(this._parent.aboutBut);
hideBtn(this._parent.contBut);[/SIZE]