I’m trying to find a way to stop my clock from ticking using event handlers. I almost have it, but for some reason the second hand (the one im only testing at the moment) is still rotating.
This is my code that i’m using to try and stop the hand from rotating:
function clockStop(e:MouseEvent){
sec.removeEventListener(Event.EXIT_FRAME, enterFrameListener);
trace("click");
}
stage.addEventListener(MouseEvent.CLICK, clockStop);
Just above this code is my enterFrameListener which rotates the minute, second and hour hands.
Also, above this i have of course the attached enterFrameListener to the second hand:
sec.addEventListener(Event.ENTER_FRAME, enterFrameListener);