# Buttons wont work

**URL:** <https://forum.kirupa.com/t/buttons-wont-work/181503>\
**Category:** flash\
**Created:** [March 9, 2006, 9:56pm UTC](https://forum.kirupa.com/t/buttons-wont-work/181503 "2006-03-09T21:56:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fergal](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/fergal/32/2231_2.png) [@Fergal](https://forum.kirupa.com/u/Fergal)\
**Post date:** [March 9, 2006, 9:56pm UTC](https://forum.kirupa.com/t/buttons-wont-work/181503/1 "2006-03-09T21:56:51Z")

</div>

okay, im using a menu slider i got off flash kit. it was created in flash mx, im using flash mx2004. the slider works, ie the slider slides lol, but when i want the frame to change upon clicking the button, it wont. here is the code of the button:

on (rollOver) {  
// slider - Movie Clip’s Instance Name. button\_1 - Button’s Instance Name.  
slider.xMove = button\_1.\_x;  
}

on(release){  
gotoAndPlay(2);  
}

the rollover of that button works, not the release.  
heres the code of the frame the slider is in:  
easeSpeed = 5;  
//slider\_mc is your Movie Clip’s name, not the Instance Name.  
slider\_mc.onEnterFrame = function() {  
this.\_x += (xMove1-this.\_x)/easeSpeed;  
};  
button\_1.onPress = function() {  
xMove = button\_1.\_x;  
};  
button\_2.onPress = function() {  
xMove = button\_2.\_x;  
};  
button\_3.onPress = function() {  
xMove = button\_3.\_x;  
};  
button\_4.onPress = function() {  
xMove = button\_4.\_x;  
};

why wont this work. thanks.
