Hi- I was playing around with the old Menu with Slider Tutorial:
http://www.kirupa.com/developer/mx2004/menu_with_slider.htm
And it works as I would expect it to. I ended up modifying it to work vertically instead of horizontally, deleted the what would appear to be a lot of unecessary code, and moved all of the actionscript code off the button instances and to the main timeline. I was doing fine until I tried moving the code that is applied to the “slider” clip:
onClipEvent (load) {
yMove = _y;
easeSpeed = 5;
}
onClipEvent (enterFrame) {
_y += (yMove-_y)/easeSpeed;
}
I’m not exactly sure what modifications I need to make to this code in order to put it with the rest of the code on the main timeline here:
button_1.onRollOver = function() {
slider.yMove = button_1._y;
};
button_2.onRollOver = function() {
slider.yMove = button_2._y;
};
button_3.onRollOver = function() {
slider.yMove = button_3._y;
};
button_4.onRollOver = function() {
slider.yMove = button_4._y;
};
I tried this:
slider.onLoad = function() {
yMove = _y;
easeSpeed = 5;
};
slider.onEnterFrame = function() {
_y += (yMove-_y)/easeSpeed;
};
button_1.onRollOver = function() {
slider.yMove = button_1._y;
};
button_2.onRollOver = function() {
slider.yMove = button_2._y;
};
button_3.onRollOver = function() {
slider.yMove = button_3._y;
};
button_4.onRollOver = function() {
slider.yMove = button_4._y;
};
But it doesn’t work now. Any help would be appreciated. Thanks.