im trying to make one of those things that move on the button your hovering over in flash mx, and im really new to this and my code is messed up, it works alittle bit, but is very glitchy, it shakes when hovering over a button and looks very bad. Heres my code:
---
on the button
---
on (rollOver)
{
_global.slidespot = _xmouse;
// makes the arrow thing go over where mouse was hovered
}
on (rollOut)
{
_global.slidespot = 525;
// makes the arrow go back to original spot
}
---
on the slider thing
---
onClipEvent(enterFrame)
{
if (_x > _global.slidespot)
{ _x = _x - 10 }
if (_x < _global.slidespot)
{ _x = _x + 10 }
}
i didnt copy and paste those codes i retyped them, but im pretty sure thats accurate to my code. i understand why it shakes but dont know how to fix it, and i dont like how it goes to the mouse position, is there a variable for the center position of the button? =o
my swf is at http://pimpster.gamersregion.com/testing/template.html