How to stop a timer from another class?
Hi I'm trying to stop a timer in stopwatch class from MainMenu class. But my code doesn't work, here is my code:
in MainMenu class i've method:
public function pauseGame (e:MouseEvent){
timestop = new Stopwatch();
timestop.Stoptimer(); }
in class Stopwatch i try to stop my timer with:
public function Stoptimer(){
timer.stop();
timer.removeEventListener(TimerEvent.TIMER, timeFun);
return; }
