# AS3 add/remove Event Listeners within functions

**URL:** <https://forum.kirupa.com/t/as3-add-remove-event-listeners-within-functions/267275>\
**Category:** Uncategorized\
**Created:** [July 30, 2008, 9:38am UTC](https://forum.kirupa.com/t/as3-add-remove-event-listeners-within-functions/267275 "2008-07-30T09:38:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eden\_guy](https://avatars.discourse-cdn.com/v4/letter/e/85e7bf/32.png) [@Eden\_guy](https://forum.kirupa.com/u/Eden_guy)\
**Post date:** [July 30, 2008, 9:38am UTC](https://forum.kirupa.com/t/as3-add-remove-event-listeners-within-functions/267275/1 "2008-07-30T09:38:16Z")

</div>

I might just be massively retarded but I’m having trouble adding or removing event listeners within functions… I know this has worked for me before but I seem to be doing something wrong now.

Sigh… If anyone can explain to me why I’m recieving ReferenceError: Error #1069: Property ROLL\_OUT not found on flash.events.MouseEvent and there is no default value. I’d appreciate it a ton!

It’s just a simple removeEventListener within a rollover/rollout function…

Aargh!

Thanks in advance 🙂
