# Flash: Basic button actionscript

**URL:** https://forum.kirupa.com/t/flash-basic-button-actionscript/311450
**Category:** flash
**Created:** [July 6, 2010, 10:10pm UTC](https://forum.kirupa.com/t/flash-basic-button-actionscript/311450 "2010-07-06T22:10:46Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![whippetkid1971](https://avatars.discourse-cdn.com/v4/letter/w/54ee81/32.png) [@whippetkid1971](https://forum.kirupa.com/u/whippetkid1971)
#### Post date: [July 6, 2010, 10:10pm UTC](https://forum.kirupa.com/t/flash-basic-button-actionscript/311450/1 "2010-07-06T22:10:46Z")

</div>

Hi,

I have created several button which have a rollover/rollout state using a rewind movieclip action:

stop();

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

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

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

This works perfectly when an instance of the movie clip is place on the stage, also when I make the instance a button or create a button and place the clip in side it again works fine, however when I add any basic script such as:

on (press) {  
gotoAndStop;  
}

To take it to a frame label in the current scene the simple jump to frame action and the movie clip stop working…any ideas?

Cheers
