ActionScript TypeError: Error #1006: addEventlistener is not a function.
Description:
This ActionScript error is wonderfully simple. It comes from calling something that you think is a function but Flash doesn’t recognize as such. Error #1006 can pop up for a different reason too. Make sure to see my first post on AS3 Error 1006 if the answer below doesn’t solve it for you.
Fix:
Look closely at the code above. In my case I just misspelled the native call to add an event listener. I typed addEventlistener with a lower case “l” instead of “addEventListener” with “L” capitalized. The fix is just to spell it correctly.
Bad Code:
blackBarFull_mc.addEventlistener(TouchEvent.TOUCH_TAP, navBack);
Good Code:
blackBarFull_mc.addEventListener(TouchEvent.TOUCH_TAP, navBack);
Easy Error, Easy Fix.
Related AS3 Error:
Flex / Flash Error #1006 value is not a function
As always Happy Flashing
Curtis J Morley