I'm using TweenMax to animate some arrows to move when I roll over a link, and the animate back, when I roll out. But it's not working, it animates on rollover, but not rollout.
function boxLink(mc_function:MovieClip, mc_target:MovieClip) {
mc_function.onRollOver = function() {
var myTween:TweenMax = new TweenMax(mc_target,0.5,{_x:"2", _alpha:50, ease:Back.easeOut});
};
mc_function.onRollOut = function() {
myTween.reverse();
};
}
boxLink(link_a1,arrow_a1);
What am I doing wrong?
Is there a better way to write this code?