# Help with Transitions Between External SWF's AS

**URL:** https://forum.kirupa.com/t/help-with-transitions-between-external-swfs-as/215029
**Category:** flash
**Created:** [February 3, 2007, 4:19am UTC](https://forum.kirupa.com/t/help-with-transitions-between-external-swfs-as/215029 "2007-02-03T04:19:25Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ajfloyd213](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@ajfloyd213](https://forum.kirupa.com/u/ajfloyd213)
#### Post date: [February 3, 2007, 4:19am UTC](https://forum.kirupa.com/t/help-with-transitions-between-external-swfs-as/215029/1 "2007-02-03T04:19:25Z")

</div>

I’m relatively new to Action Script and Flash 8 and I need help with the code…

I am using a movie clip to create a rollover button with the code as:

stop();

this.onEnterFrame = function(){  
if(rewind == true){  
prevFrame();  
}

}  
this.onRollOver = function(){  
rewind = false;  
play();  
}

this.onRollOut = function(){  
rewind = true;  
}

this.onRelease = function(){

}

and I want to incorporate the following code into the this.onRelase = function section, but I cannot figure out how. The code is for a button and I can’t seem to make it for a movie clip. here is what I want to incorporate:

on (release) { if (\_root.currMovie == undefined) { \_root.currMovie = “work”; container.loadMovie(“work.swf”); } else if (\_root.currMovie != “work”) { if (container.\_currentframe \>= container.midframe) { \_root.currMovie = “work”; container.play();}}}Can anyone please Help ME!!
