I have simple question that it became complected for me which is:
I have a function which is called and run after around 11 seconds:
var myTimeoutClickObject = setTimeout(clickObject,11000);
function clickObject():void{
//My code
}
I also have a Reset Button that I made a Click Function for it:
reset_btn.addEventListener(MouseEvent.CLICK, reset);
function reset(e:MouseEvent):void{
//My code
}
Now, I want to make the clickObject()
function disabled for around 11 seconds again every time that I click on the reset_btn
Button.
I really appreciate, if you can help me in this matter!
Thanks in advance!
You can make it using flag:
Or use clearTimeout like this: