I tried to make two buttons, one that starts an interval and one that stops it. This is my code:
s_start.addEventListener(MouseEvent.CLICK, startRepeater);
s_stop.addEventListener(MouseEvent.CLICK, stopRepeater);
function startRepeater(e:MouseEvent) : void {
setInterval(repeater,500);
}
function stopRepeater(e:MouseEvent) : void {
clearInterval(repeater);
}
The start button works perfectly! but the stop button doesn't. 1067: Implicit coercion of a value of type Function to an unrelated type uint.
Thank you for your help in advance.