# Event Listener for MC that dont exist

**URL:** <https://forum.kirupa.com/t/event-listener-for-mc-that-dont-exist/281902>\
**Category:** flash\
**Created:** [February 14, 2009, 7:56pm UTC](https://forum.kirupa.com/t/event-listener-for-mc-that-dont-exist/281902 "2009-02-14T19:56:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![evokenz](https://avatars.discourse-cdn.com/v4/letter/e/b2d939/32.png) [@evokenz](https://forum.kirupa.com/u/evokenz)\
**Post date:** [February 14, 2009, 7:56pm UTC](https://forum.kirupa.com/t/event-listener-for-mc-that-dont-exist/281902/1 "2009-02-14T19:56:51Z")

</div>

Hi all,

Quick question:

I am loading an external swf file. This file contains buttons, text fields etc

I am controlling it through a class file.

The problem I am having is setting up event listeners for objects that are not yet loaded on the external swf’s timeline yet…

Example

at the end of the swf i have a next button which is used to load the next swf file.  
But this next btn only shows up on the file frame, so in the class file if I try to reference it, flash obviously thinks it doesnt exist…

Whats the best approach? I was thinking about using an on enter frame listener to detect when this button is loaded??
