# Mouse Event Error please help

**URL:** <https://forum.kirupa.com/t/mouse-event-error-please-help/271913>\
**Category:** Uncategorized\
**Created:** [September 30, 2008, 10:44am UTC](https://forum.kirupa.com/t/mouse-event-error-please-help/271913 "2008-09-30T10:44:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adnan794](https://avatars.discourse-cdn.com/v4/letter/a/8edcca/32.png) [@adnan794](https://forum.kirupa.com/u/adnan794)\
**Post date:** [September 30, 2008, 10:44am UTC](https://forum.kirupa.com/t/mouse-event-error-please-help/271913/1 "2008-09-30T10:44:12Z")

</div>

HelloI am tring a very simple Mouse event programme for some reason its giving me this error.I am creating two buttons and adding them to a sprite and then I am attaching addEvent listener to the sprite object and when any of the two buttons inside that sprite is clicked I am calling a function in the button class that returns the name of the button. but it is not calling this function and is tracing an undefined value here is the code.
