# \[Flash CS3\] Need help with complex button script

**URL:** https://forum.kirupa.com/t/flash-cs3-need-help-with-complex-button-script/288303
**Category:** flash
**Created:** [May 13, 2009, 10:10pm UTC](https://forum.kirupa.com/t/flash-cs3-need-help-with-complex-button-script/288303 "2009-05-13T22:10:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![onlyhands](https://avatars.discourse-cdn.com/v4/letter/o/ecb155/32.png) [@onlyhands](https://forum.kirupa.com/u/onlyhands)
#### Post date: [May 13, 2009, 10:10pm UTC](https://forum.kirupa.com/t/flash-cs3-need-help-with-complex-button-script/288303/1 "2009-05-13T22:10:36Z")

</div>

Hello,

Thank you for your interest. I’m using a complex button as discussed in this thread ([http://www.kirupa.com/developer/mx2004/button\_effect.htm](http://www.kirupa.com/developer/mx2004/button_effect.htm)). This button works beautifully when used just like on that thread, to open a URL in a new page; however, I cannot make it control the timeline.

Below is the script I currently have, which is pretty much the one on the thread I mention above, except for the last function. Can someone please help me? Thanks in advance.

stop();

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

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

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

this.onRelease = function(){  
gotoAndPlay(11);  
}
