1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| import fl.transitions.Tween;
import fl.transitions.easing.*;
var PositionDébut:Number = menu_mc.x;
var PositionFin:Number = 50
var MonTween:Tween = new Tween (menu_mc, "x", Regular.easeInOut, PositionDébut, PositionFin, 1, true);
MonTween.stop();
menu_mc.addEventListener(MouseEvent.ROLL_OVER, menuOver);
menu_mc.addEventListener(MouseEvent.ROLL_OUT, menuOut);
function menuOver (e:MouseEvent)
{
MonTween.continueTo(PositionFin, MonTween.duration);
}
function menuOut (e:MouseEvent)
{
MonTween.continueTo(PositionDébut, MonTween.duration);
} |
Partager