# Help with these buttons

**URL:** <https://forum.kirupa.com/t/help-with-these-buttons/185277>\
**Category:** Uncategorized\
**Created:** [April 12, 2006, 5:23am UTC](https://forum.kirupa.com/t/help-with-these-buttons/185277 "2006-04-12T05:23:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![c\_house](https://avatars.discourse-cdn.com/v4/letter/c/2acd7d/32.png) [@c\_house](https://forum.kirupa.com/u/c_house)\
**Post date:** [April 12, 2006, 5:23am UTC](https://forum.kirupa.com/t/help-with-these-buttons/185277/1 "2006-04-12T05:23:32Z")

</div>

i have movies with this code on them:

onClipEvent(load)  
{

totalframes=20;

this.onRollOver=function()  
{ if(this.\_currentframe\>totalframes/2)  
{ this.gotoAndPlay(totalframes-this.\_currentframe);   
}else{  
this.play();  
} }

this.onRollOut=function()  
{ if(this.\_currentframe\<totalframes/2)  
{ this.gotoAndPlay(((totalframes/2)-this.\_currentframe)+(totalframes/2));  
}else{  
this.play();  
} }

}

i cant figure out how to get them to load an external swf in to a blank mc

i have put clear buttons ontop of them which works but it stops the movie clip from playing.

any help woud be great. thanks

---

<div class="post-metadata">

**Author:** ![Pascal\_S](https://avatars.discourse-cdn.com/v4/letter/p/f6c823/32.png) [@Pascal\_S](https://forum.kirupa.com/u/Pascal_S)\
**Post date:** [April 12, 2006, 6:19am UTC](https://forum.kirupa.com/t/help-with-these-buttons/185277/2 "2006-04-12T06:19:21Z")

</div>

sry went wrong here  
[FONT=Courier New][/FONT]

---

<div class="post-metadata">

**Author:** ![Pascal\_S](https://avatars.discourse-cdn.com/v4/letter/p/f6c823/32.png) [@Pascal\_S](https://forum.kirupa.com/u/Pascal_S)\
**Post date:** [April 12, 2006, 6:24am UTC](https://forum.kirupa.com/t/help-with-these-buttons/185277/3 "2006-04-12T06:24:57Z")

</div>

you have movieclips for buttons. Give the mc an instance name like “button1”, then put on the stage in frame 1 some actionsscript:

```auto

button1.onRelease = function() {
container.loadMovie("external swf name")
}

```

or

in the actionsscript on the movieclip itself like you have

```auto

onClipEvent(load)
{

totalframes=20;

this.onRollOver=function() {
if(this._currentframe>totalframes/2)
{ this.gotoAndPlay(totalframes-this._currentframe);
}else{
this.play();
} }

this.onRollOut=function()
{ if(this._currentframe<totalframes/2)
{ this.gotoAndPlay(((totalframes/2)-this._currentframe)+(totalframes/2));
}else{
this.play();
} }

this.onRelease = function() {
container.loadMovie("external swf name")
}

}

```
