# Combining Complex Buttons and External SWF Transitions

**URL:** <https://forum.kirupa.com/t/combining-complex-buttons-and-external-swf-transitions/155684>\
**Category:** flash\
**Created:** [July 19, 2005, 4:25pm UTC](https://forum.kirupa.com/t/combining-complex-buttons-and-external-swf-transitions/155684 "2005-07-19T16:25:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ammdaddy](https://avatars.discourse-cdn.com/v4/letter/a/85e7bf/32.png) [@ammdaddy](https://forum.kirupa.com/u/ammdaddy)\
**Post date:** [July 19, 2005, 4:25pm UTC](https://forum.kirupa.com/t/combining-complex-buttons-and-external-swf-transitions/155684/1 "2005-07-19T16:25:35Z")

</div>

[size=2]Hello,

I hope someone can help me.

I have made a complex button with the help of [warhero’s tutorial](http://www.kirupa.com/developer/mx2004/button_effect.htm). The onRelease event of this script opens a URL when clicked.

What I need is to have the onRelease event of this script load an external movie into a container mc based on [Voetsjoeba’s Transitions tute.](http://www.kirupa.com/developer/mx2004/transitions2.htm)

I thought I’d try combining the if/else statement from Voetsjoeba into the complex button script, but this does not work. Can someone tell me how to combine these scripts?

Here’s the Actions - Frame I need help with. Many thanks.  
[/size]

```auto
 stop(); 
 
this.onEnterFrame = function(){ 
if(rewind == true){ 
prevFrame(); 
} 
} 
 
this.onRollOver = function(){ 
rewind = false; 
play(); 
} 
 
this.onRollOut = function(){ 
rewind = true; 
} 
 
this.onRelease = function(){ 
if (_root.currMovie == undefined) { 
_root.currMovie = "OneOn"; 
container.loadMovie("OneOn.swf"); 
} else if (_root.currMovie != "OneOn") { 
if (container._currentframe >= container.midframe) { 
_root.currMovie = "OneOn"; 
container.play(); 
} 
} 
}
 
 
 

```
