Here is what I have. This code works great. However, I need to be able to turn it off or delete the timer function.
PHP Code:
var TimeOutID
var OverFlag=false
var HitFlag=false
onEnterFrame=function(){
HitFlag=this.hitTest(_root._xmouse,_root._ymouse,true)
if (HitFlag){
clearTimeout(TimeOutID)
OverFlag=true
TimeOutID=null
}else{
if (OverFlag && TimeOutID==null)TimeOutID=setTimeout(Disappear, 700, this) //5000 milliSeconds (5 secs)
}
}
function Disappear(nav_mc){
gotoAndPlay(3);
menuBig.process.gotoAndPlay(3);
menuBig.work.gotoAndPlay(3);
menuBig.news.gotoAndPlay(3);
menuBig.connect.gotoAndPlay(3);
// Assume "park" is the frame label inside your movie clip.
// mc.gotoAndStop(10) // If want to use a frame number. Assume 10 is a frame number in you movie clip to go and stop.
delete TimeOutID
delete onEnterFrame
}
As you can see it is a simple timer kinda thing. After timing out it goes to a frame where I have tween code waiting so that the buttons ease off stage. NOW.. When I click a button I am wanting to (I guess in a global kinda way) kill this code so that it does not perform the final instructions. Now when you click a button my code moves the buttons off stage nicely BUT the timer repeats that "going off stage" action. How can you fix that? Thanks a ton.