# Smooth roll-over/out buttons combined with loading external swf's with transitions

**URL:** <https://forum.kirupa.com/t/smooth-roll-over-out-buttons-combined-with-loading-external-swfs-with-transitions/256249>\
**Category:** Uncategorized\
**Created:** [April 1, 2008, 8:43am UTC](https://forum.kirupa.com/t/smooth-roll-over-out-buttons-combined-with-loading-external-swfs-with-transitions/256249 "2008-04-01T08:43:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeonEphraim](https://avatars.discourse-cdn.com/v4/letter/l/45deac/32.png) [@LeonEphraim](https://forum.kirupa.com/u/LeonEphraim)\
**Post date:** [April 1, 2008, 8:43am UTC](https://forum.kirupa.com/t/smooth-roll-over-out-buttons-combined-with-loading-external-swfs-with-transitions/256249/1 "2008-04-01T08:43:49Z")

</div>

Hey,

I’m new on this forum. I allready tried to find an answer in the existing threads, but I couldn’t find it. A couple of days ago I tried the tutorial on making transitions between external swf’s ([http://www.kirupa.com/developer/mx2004/transitions.htm](http://www.kirupa.com/developer/mx2004/transitions.htm)). Everything worked fine at first when I used normal button movie clips. But when I tried to make it work with smooth roll-over / roll-out buttons, it didn’t work any longer. Ⓜ .

These ‘smooth’ buttons are movieclips in which an animation plays at rollover, stops, and reverses the animation on rollout. These actions are assigned to a hitarea-button (transparent button in the smoothbutton movieclip). In the main timeline, the external swf’s are supposed to load in an ‘container’-movieclip.

The tutorial on the trasitions refers to the forum when help is needed, so here goes :elderly: :  
Does someone know what I’m doing wrong? I know it must have something to do with the action script I assign to the hitarea in the smooth-button-movieclips. The AS-code I use on this hitarea is:

> on (rollOver, dragOver) {  
> play();  
> controller.gotoAndStop(1);

}  
on (rollOut, dragOut) {  
controller.gotoAndPlay(2);  
}

I tried to just paste the following after the roll-over / roll-out AS code

> on (release) {  
> if (\_root.currMovie == undefined) {  
> \_root.currMovie = “main”;  
> container.loadMovie(“main.swf”);  
> } else if (\_root.currMovie != “main”) {  
> if (container.\_currentframe \>= container.midframe) {  
> \_root.currMovie = “main”;  
> container.play();  
> }  
> }  
> }

But like I wrote before, it works just fine when I use the code on normal button-movieclips, but not with the roll-on-rollout movieclips.

Please excuse me if my English is not flawless, it’s not my first language.

Thanx a lot!

PS. I posted this thread under ‘flash MX or older’, because the transition tutorial was made for ‘flash MX or older’ users.
