# AS3 Button Events to load external SWF's into mc on stage

**URL:** <https://forum.kirupa.com/t/as3-button-events-to-load-external-swfs-into-mc-on-stage/304293>\
**Category:** flash\
**Created:** [February 5, 2010, 12:02am UTC](https://forum.kirupa.com/t/as3-button-events-to-load-external-swfs-into-mc-on-stage/304293 "2010-02-05T00:02:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShareeNeff](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@ShareeNeff](https://forum.kirupa.com/u/ShareeNeff)\
**Post date:** [February 5, 2010, 12:02am UTC](https://forum.kirupa.com/t/as3-button-events-to-load-external-swfs-into-mc-on-stage/304293/1 "2010-02-05T00:02:38Z")

</div>

Hi, I have been trying to pick up more as3 lately, also have been converting some of my sites from as2 to as3. So I’ve seen alot of threads regarding my problem, but no clear concise solution. Here’s what I desperately need help understanding.

In as2 I could create 3 menu buttons and save them in a mc- lets call it menu\_mc. This menu\_mc sits on my main stage. I have also placed a mc on stage to hold anything that I load. Lets call it holder\_mc. So I figured out how to get my email button to work using this:

email\_mc.addEventListener(MouseEvent.CLICK, mailto);  
function mailto(event:MouseEvent):void {  
var email:URLRequest = new URLRequest(“[mailto:myemail@mail.com](mailto:myemail@mail.com)”);  
navigateToURL(email, “\_blank”);  
}

That’s fine. What I can’t for the life of me figure out is understanding how to click on one of my menu buttons and load a swf into my holder\_mc on stage.

In as2 I could use this code on a button :

on (release) {  
//load Movie Behavior  
if(this.my\_holder == Number(this.my\_holder)){  
loadMovieNum(“test.swf”,this.my\_holder);  
} else {  
this.my\_holder.loadMovie(“test.swf”);  
}  
//End Behavior  
}

Can someone please help me. Teaching myself is not easy and I am sure there’s alot I am missing, even though I watch alot of tutorials, I haven’t found any that do what I am trying to do.

You can see what I am trying to do here: [http://shareeneff.com/NEW.html](http://shareeneff.com/NEW.html)

Thanks for your help and advice in advance!
