# Recognizing within main timeline a button located inside externally loaded .swf

**URL:** <https://forum.kirupa.com/t/recognizing-within-main-timeline-a-button-located-inside-externally-loaded-swf/89974>\
**Category:** flash\
**Created:** [May 13, 2005, 5:19am UTC](https://forum.kirupa.com/t/recognizing-within-main-timeline-a-button-located-inside-externally-loaded-swf/89974 "2005-05-13T05:19:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![PaintedSwan](https://avatars.discourse-cdn.com/v4/letter/p/90db22/32.png) [@PaintedSwan](https://forum.kirupa.com/u/PaintedSwan)\
**Post date:** [May 13, 2005, 5:19am UTC](https://forum.kirupa.com/t/recognizing-within-main-timeline-a-button-located-inside-externally-loaded-swf/89974/1 "2005-05-13T05:19:32Z")

</div>

Hello all. 😃 I’m using the preloader like the one rhamej posted here:

[http://www.kirupa.com/forum/showthread.php?t=94888](http://www.kirupa.com/forum/showthread.php?t=94888)

The part of the code I need help with is as follows:

[AS]  
//fire the MovieClipLoader and attach the listener to it  
var container1:MovieClipLoader = new MovieClipLoader();  
container1.addListener(mclListener);  
container1.loadClip(“1\_movie.swf”, container);  
//button actions  
\_root.enter\_button.onRelease = function() {  
container1.loadClip(“tree20.swf”, container);  
};  
[/AS]

I realize the code is wrong. I wondered if it was possible after loading an external .swf (“1\_movie.swf”) within the container, if you could then press a button (enter\_button) located within the external .swf (“1\_movie.swf”) , and use the preloader code to load another external .swf on release (“tree20.swf”). I’m having trouble because the preloader code is in the main timeline of my main flash file (“index.fla”), and I don’t know how to make the preloader code recognize the button located within the external .swf, and use it to load another external .swf within the same movie clip. Any help would be appreciated. 🙂
