Got 9 MCs which I want a rollover effect for. I made 1, copied it and it’s instance name 9 times. And made this script:
function menu_btn_over() {
myTween = new mx.transitions.Tween(_root.main.menu.btn.btn_parent, "_x", mx.transitions.easing.Strong.easeOut, _root.main.menu.btn.btn_parent._x, 0, inspeed);
}
function menu_btn_out() {
myTween = new mx.transitions.Tween(_root.main.menu.btn.btn_parent, "_x", mx.transitions.easing.Strong.easeOut, _root.main.menu.btn.btn_parent._x, -160, inspeed);
}
_root.main.menu.btn.onRollOver = function() {
menu_btn_over();
};
_root.main.menu.btn.onRollOut = function() {
menu_btn_out();
};
But it only works for one of the buttons. The one I made the copies from.
I figured you could do this since it’s the same MC? I could be wrong though. If that is the case, is there some way I can make the same action for every button without having to make a bunch of calls for each one? for example:
“_root.main.menu.btn1 <and> btn2 <and> btn3 <and> etc.onRollOut = function() {”
Thanks!