# Menu with Slider object in AS3?

**URL:** <https://forum.kirupa.com/t/menu-with-slider-object-in-as3/310199>\
**Category:** flash\
**Created:** [June 3, 2010, 11:07pm UTC](https://forum.kirupa.com/t/menu-with-slider-object-in-as3/310199 "2010-06-03T23:07:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimmayjimmayhan](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@jimmayjimmayhan](https://forum.kirupa.com/u/jimmayjimmayhan)\
**Post date:** [June 3, 2010, 11:07pm UTC](https://forum.kirupa.com/t/menu-with-slider-object-in-as3/310199/1 "2010-06-03T23:07:30Z")

</div>

Hi guys,  
I am a total noob at flash in general (just started last week) and I want to make a menu with a slider that can be found here at

```auto
http://www.kirupa.com/developer/mx2004/menu_with_slider.htm

```

but in AS3. I’m sort of stuck on how to get the slider to move to the middle of the button that my mouse rolls over to and to keep it so that it only moves when my mouse is in the menu area. Here is what I have so far:

```auto
stop();

 import fl.transitions.Tween;
 import fl.transitions.easing.*;
 var homeTween:Tween = new Tween(content_mc, "x", Regular.easeOut, content_mc.x, 0, 1, true);
 new Tween(box_mc, "x", Regular.easeOut, box_mc.x, 400, 1, true);

home.addEventListener(MouseEvent.CLICK, clickSection);
aboutme.addEventListener(MouseEvent.CLICK, clickSection);
blog.addEventListener(MouseEvent.CLICK, clickSection);
funstuff.addEventListener(MouseEvent.CLICK, clickSection);

function clickSection(evtObj:MouseEvent){
    gotoAndStop(evtObj.target.name);
}

home.addEventListener(MouseEvent.MOUSE_OVER,slidermove);
aboutme.addEventListener(MouseEvent.MOUSE_OVER,slidermove);
blog.addEventListener(MouseEvent.MOUSE_OVER,slidermove);
funstuff.addEventListener(MouseEvent.MOUSE_OVER,slidermove);
function slidermove(evtObj:MouseEvent){
        var sliderTween:Tween = new Tween(slider_mc, "x", Regular.easeOut, slider_mc.x, evtObj.target.mouseX, 1, true);
}

```

Can anyone help me? Thanks!

Jimmy
