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
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:
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