# No Method with the name 'addListener'

**URL:** <https://forum.kirupa.com/t/no-method-with-the-name-addlistener/65001>\
**Category:** flash\
**Created:** [September 22, 2004, 4:37am UTC](https://forum.kirupa.com/t/no-method-with-the-name-addlistener/65001 "2004-09-22T04:37:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![d2kagw](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/d2kagw/32/539_2.png) [@d2kagw](https://forum.kirupa.com/u/d2kagw)\
**Post date:** [September 22, 2004, 4:37am UTC](https://forum.kirupa.com/t/no-method-with-the-name-addlistener/65001/1 "2004-09-22T04:37:53Z")

</div>

Ok,

I have one script which is working a treat ( using ASBroadcasters )  
and then today, I copied and pasted the same script into a new site and whenever I try to register a listener, I get the dreaded “There is no method with the name addListener”…

Any ideas as to why this is happening.

oh, and a few things.  
the broadcasting object is a class extending the XML class, and i have used the same script before with no issues  
the listening object extends the object class, and whilst this class has been freshly developed, the last time I used the ASBroadcaster methods I didn’t have to extend anything for it to work…

please help, i’ve wasted two days on this, and really can’t afford to spend any more… ☹

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 22, 2004, 11:09am UTC](https://forum.kirupa.com/t/no-method-with-the-name-addlistener/65001/2 "2004-09-22T11:09:13Z")

</div>

Just taking a stab in the dark: could it be that it uses addEventListener() instead of addListener() ?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 22, 2004, 10:46pm UTC](https://forum.kirupa.com/t/no-method-with-the-name-addlistener/65001/3 "2004-09-22T22:46:14Z")

</div>

I had actually worked it out,  
the addListener method can only be put on certain types of objects, most of which are the key, stage, mouse etc etc  
I was trying to get a class to listen to a class within itself… which as I found out last night, is a no-go-er, bummer.

Change of question…

Whats the best way for a class to broadcast and even so another class can react?
