up.addEventListener(MouseEvent.CLICK,
function clickFunc(event:MouseEvent):void
{
revealSpinner(event,51.42,1,spinner);
event.currentTarget.removeEventListener(event.type, arguments.callee);
autoTimer.stop();
},
false, 0, true);
down.addEventListener(MouseEvent.CLICK,
function clickFunc(event:MouseEvent):void
{
revealSpinner(event,51.42,-1,spinner);
event.currentTarget.removeEventListener(event.type, arguments.callee);
autoTimer.stop();
},
false, 0, true);
The above code adds a listener to a couple of MC's. Originally the methods were anonymous but I have named them clickFunc() in order to try an reference them in my remove listener.
Here is my remove listener code. Both of these snippets are in separate functions. The add listener method is called before the remove method.
up.removeEventListener(MouseEvent.CLICK, clickFunc );
down.removeEventListener(MouseEvent.CLICK, clickFunc);
As soon as I publish the movie I get this error:
1120: Access of undefined property clickFunc.