# Slider scale to fit button

**URL:** <https://forum.kirupa.com/t/slider-scale-to-fit-button/136577>\
**Category:** Uncategorized\
**Created:** [February 6, 2005, 4:26pm UTC](https://forum.kirupa.com/t/slider-scale-to-fit-button/136577 "2005-02-06T16:26:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ncpiment](https://avatars.discourse-cdn.com/v4/letter/n/9de0a6/32.png) [@ncpiment](https://forum.kirupa.com/u/ncpiment)\
**Post date:** [February 6, 2005, 4:26pm UTC](https://forum.kirupa.com/t/slider-scale-to-fit-button/136577/1 "2005-02-06T16:26:57Z")

</div>

Hi there,  
I would like to do something like in “Meno with slider” tutorial but make the slider fit it self in buttons that are in diferent scale.  
Is it possible to make the slider fit to the size of the button and resize when you go to another button of defirent size.

For the Slider

> 

onClipEvent (load) {  
xMove = \_x;  
xScale = \_x;  
easeSpeed = 6;  
}  
onClipEvent (enterFrame) {  
\_x += (xMove-\_x)/easeSpeed;  
\_xscale += (xScale-\_x)/easeSpeed;;  
}

For the Button

> 

on (rollOver) {  
slider.xMove = Links.\_x;  
slider.xScale = Links.\_x;  
}
