Thank you for your quick responses.
I tried out your code Jamie, but it doesn't work, even with invisible button. Tweening didn't get fired or just sometime. And if I hovered the mouse very quickly many times on the inv_btn, the tweening happens as many times as the mouse was over!! Putting
var tl:TimelineLite = new TimelineLite();
outside the btn_over-function was good, but I had to put the
tl.append(TweenLite ...
inside btn_over-funtion, otherwise nothing would happen.
Because it didn't work, I changed the code and only using TweenLite w/o TimelineLite. Now it works great. Here's the very simple code:
hitarea.buttonMode = true;
inv_btn.mouseChildren = false;
inv_btn.addEventListener(MouseEvent.ROLL_OVER, btn_over);
inv_btn.addEventListener(MouseEvent.ROLL_OUT, btn_out);
function btn_over(e:MouseEvent):void
{
TweenLite.to(right_arrow, 0.8, { x:right_arrow.x+50, scaleX:2.5, scaleY:2.5, ease:Elastic.easeOut });
}
function btn_out(e:MouseEvent):void
{
TweenLite.to(right_arrow, 0.5, { x:right_arrow.x, scaleX:2, scaleY:2, ease:Elastic.easeOut });
}
PS: And yes, Carl, relative Number caused problems in this case. And the inv_btn (normally I always use inv_btn ) is also the solution. But one last thing. You misunderstood the problem I had with "Roll_out not registered". When the tweening is still running, and I go out with the mouse, the btn expected me to go out "once again" as soon as the tweening has ended. That means: if I go back on the btn, no "roll_over" happens until I go out and NOW the "roll_out" has been fired out. So I had to wait until the tweening ends and then go out off btn, or have to go over btn twice in order to fire out "roll_over"-event :/