# Stop a timer on CLICK, once already started, help!

**URL:** <https://forum.kirupa.com/t/stop-a-timer-on-click-once-already-started-help/276788>\
**Category:** flash\
**Created:** [December 3, 2008, 5:37pm UTC](https://forum.kirupa.com/t/stop-a-timer-on-click-once-already-started-help/276788 "2008-12-03T17:37:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wuzzi2ya](https://avatars.discourse-cdn.com/v4/letter/w/e79b87/32.png) [@wuzzi2ya](https://forum.kirupa.com/u/wuzzi2ya)\
**Post date:** [December 3, 2008, 5:37pm UTC](https://forum.kirupa.com/t/stop-a-timer-on-click-once-already-started-help/276788/1 "2008-12-03T17:37:40Z")

</div>

stage.addEventListener(MouseEvent.CLICK, burnIt);  
function burnIt(event:MouseEvent):void {  
if (mouseX \< 100 && mouseX \> 50 && mouseY \< 0 && mouseY \> 200) {  
timer.start();  
timer2.start();  
}  
}

I need to add an if else statement so that once the function (timer is started) clicking again will stop the timer, yet I keep getting illegal function errors. Any suggestions?

Thanks Again…
