# Interface issue and addEventListeners

**URL:** <https://forum.kirupa.com/t/interface-issue-and-addeventlisteners/294383>\
**Category:** flash\
**Created:** [August 13, 2009, 10:34am UTC](https://forum.kirupa.com/t/interface-issue-and-addeventlisteners/294383 "2009-08-13T10:34:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![www\_landed\_at](https://avatars.discourse-cdn.com/v4/letter/w/3ab097/32.png) [@www\_landed\_at](https://forum.kirupa.com/u/www_landed_at)\
**Post date:** [August 13, 2009, 10:34am UTC](https://forum.kirupa.com/t/interface-issue-and-addeventlisteners/294383/1 "2009-08-13T10:34:44Z")

</div>

I have a polymorphic situation that is thus…

```auto

private var loadXML :ILoader;

if (!Capabilities._internal) //testing locally
            {
                loadXML = new LoadXML("../assets/xml/copy_en_gb.xml");
            }
            else
            {
                loadXML = new LoadXMLSecure("www.xbox.com/copy_en_gb.xml");
            }
            
            loadXML.addEventListener(XMLParsed.PARSED, parsed);
            loadXML.addEventListener(XMLParsed.FAILED, failed);

```

So you can see that depending I’m not sure if the datatype is LoadXML or LoadSecureXML

thats why I made the Interface but now its breaking the listening for the events on these classes…:yoda:
