# Button trouble

**URL:** <https://forum.kirupa.com/t/button-trouble/259506>\
**Category:** Uncategorized\
**Created:** [May 6, 2008, 5:47am UTC](https://forum.kirupa.com/t/button-trouble/259506 "2008-05-06T05:47:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bombdigiti](https://avatars.discourse-cdn.com/v4/letter/b/b5ac83/32.png) [@bombdigiti](https://forum.kirupa.com/u/bombdigiti)\
**Post date:** [May 6, 2008, 5:47am UTC](https://forum.kirupa.com/t/button-trouble/259506/1 "2008-05-06T05:47:41Z")

</div>

ok… now that we’ve got the array’s figured out im having troubles with buttons  
basically all i want is for a movieclip called “slider” to move and adjust its length when i roll over a button called videobtn… here is what i have so far… again, thanks for your help

```auto

function moveSlider(xpos:Number, sliderwidth:Number) {
    var xPosT:Tween = new Tween(slider, "x", Regular.easeOut, slider.x, xpos, 2, true);
    var wPosT:Tween = new Tween(slider, "width", Regular.easeOut, slider.width, sliderwidth, 2, true);
}

videobtn.buttonMode = true;
videobtn.addEventListener(MouseEvent.ROLL_OVER, mouseOverVideo);
       
function mouseOverVideo(event:MouseEvent):void {
        trace("videobtnselected");
        moveSlider(12,36);
    }

```
