# Gotoandplay trouble with rollout effect

**URL:** https://forum.kirupa.com/t/gotoandplay-trouble-with-rollout-effect/273160
**Category:** Uncategorized
**Created:** [October 12, 2008, 12:15pm UTC](https://forum.kirupa.com/t/gotoandplay-trouble-with-rollout-effect/273160 "2008-10-12T12:15:24Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![barnfold](https://avatars.discourse-cdn.com/v4/letter/b/ecae2f/32.png) [@barnfold](https://forum.kirupa.com/u/barnfold)
#### Post date: [October 12, 2008, 12:15pm UTC](https://forum.kirupa.com/t/gotoandplay-trouble-with-rollout-effect/273160/1 "2008-10-12T12:15:24Z")

</div>

hello  
_trouble with gotoandplay and roll out functions_

basically i have an after effects movieclip (followed a tutorial) that i have made into a button.

it works ok on rollover and rollout i use tweener which works a treat and when i click it goes to another frame and plays a small sequence of smoke exploding.

problem:  
its a look problem really. when i rollout of the smoke click sequence it tweens back to frame 0 as per my rollover / rollout instructions

IS there a way for me to have the click smoke sequence play all the way through before going back to frame on my rollout ?

would an if statement help perhaps ?  
here is code im using

```
 Code:
 import caurina.transitions.*;

```

import caurina.transitions.properties.DisplayShortcuts;  
DisplayShortcuts.init();

butt.addEventListener(MouseEvent.ROLL\_OVER, butt\_ROLLOVER);  
butt.addEventListener(MouseEvent.ROLL\_OUT, butt\_ROLLOUT);  
butt.addEventListener(MouseEvent.CLICK, butt\_CLICK);

function butt\_ROLLOVER(event:MouseEvent):void {  
Tweener.addTween(home\_button, {\_frame:29, time:0.3, transition:“linear”});

}  
function butt\_ROLLOUT(event:MouseEvent):void {  
Tweener.addTween(home\_button, {\_frame:0, time:0.8, transition:“easeInOutCubic”});  
}  
function butt\_CLICK(event:MouseEvent) {  
home\_button.gotoAndPlay(“129”);  
var request:URLRequest = new URLRequest(“[http://someweb.com](http://someweb.com)”);  
navigateToURL(request);  
}
