# AS3 With Movie Clip Buttons

**URL:** https://forum.kirupa.com/t/as3-with-movie-clip-buttons/276355
**Category:** flash
**Created:** [November 26, 2008, 3:45am UTC](https://forum.kirupa.com/t/as3-with-movie-clip-buttons/276355 "2008-11-26T03:45:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![takklz](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@takklz](https://forum.kirupa.com/u/takklz)
#### Post date: [November 26, 2008, 3:45am UTC](https://forum.kirupa.com/t/as3-with-movie-clip-buttons/276355/1 "2008-11-26T03:45:18Z")

</div>

Whats up guys, first post here. I was wondering if you guys could give me some input as to how I might do a couple of things. I have four movie clip buttons for my website that work great. A Home, Media, About Me, and Contact button. My problem is that I want to use as3 to be able to add a loadMovie type function to each button when clicked. This would load an external swf file, that would have information in each swf for home, media etc. I can’t exactly find a tutorial, or example code that would flow with my current coded buttons. Also im not 100% sure about how i could load the external swf in a specific location. Any links to a tutorial or some help is much appreciated!  
-Taylor  
Ps: This is the code I am currently using.

```auto
btn_mc.buttonMode = true;
btn_mc.addEventListener(MouseEvent.ROLL_OVER, onButtonOver);
btn_mc.addEventListener(MouseEvent.ROLL_OUT, onButtonOut);

btn_mc1.buttonMode = true;
btn_mc1.addEventListener(MouseEvent.ROLL_OVER, onButtonOver);
btn_mc1.addEventListener(MouseEvent.ROLL_OUT, onButtonOut);

btn_mc2.buttonMode = true;
btn_mc2.addEventListener(MouseEvent.ROLL_OVER, onButtonOver);
btn_mc2.addEventListener(MouseEvent.ROLL_OUT, onButtonOut);

btn_mc3.buttonMode = true;
btn_mc3.addEventListener(MouseEvent.ROLL_OVER, onButtonOver);
btn_mc3.addEventListener(MouseEvent.ROLL_OUT, onButtonOut);

                    
function onButtonOver(e:MouseEvent):void
{
    e.currentTarget.gotoAndPlay("over");
}

function onButtonOut(e:MouseEvent):void
{
    e.currentTarget.gotoAndPlay("out");
}

```
