Flash - Play movie clip in reverse?

后端 未结 6 948
被撕碎了的回忆
被撕碎了的回忆 2020-12-10 14:02

I\'m trying to get a movie clip to play in reverse when I mouse_out from it (it plays on mouse_over).

My actionscript is as follows:

mc.stop();
mc.ad         


        
6条回答
  •  不思量自难忘°
    2020-12-10 14:07

    If the motion allows, you can use a Tween (for example if you want to change the alpha, location or scale). On the MouseOut you can call .yoyo() for the Tween, which will play it in reverse.

    Something like this:

    var tween:Tween;
    
    mc.addEventListener(MouseEvent.MOUSE_OVER,mover);
    mc.addEventListener(MouseEvent.MOUSE_OUT,mout);
    
    function mover(e:MouseEvent):void
    {
        tween = new Tween(obj, "alpha", None.easeNone, 1, 0, 1, true);
    }
    
    function mout(e:MouseEvent):void
    {
       tween.yoyo();
    }
    

提交回复
热议问题