/*舞台上有mc、mc1、mc2*/ /*import gs.TweenLite; TweenLite.to(mc, 1, {x:240, y:202,alpha:0}); TweenLite.to(mc1, 1, {x:240, y:165});*/ import fl.transitions.*; import fl.transitions.easing.Elastic; //var myTransitionManager:TransitionManager = new TransitionManager(mc); //myTransitionManager.startTransition({type:Zoom, direction:Transition.IN, duration:1, easing:Bounce.easeOut}); //myTransitionManager.startTransition({type:Zoom, direction:Transition.OUT, duration:1,easing:Bounce.easeOut}); //TransitionManager.start(mc2, {type:Zoom, direction:Transition.IN, duration:1,easing:Elastic.easeOut}); //TransitionManager.start(mc, {type:Squeeze, direction:Transition.IN, duration:10,easing:Elastic.easeOut, dimension:1}); import fl.transitions.*; import fl.transitions.easing.*; //TransitionManager.start(mc,{type:Fly, direction:Transition.IN, duration:2,easing:Strong.easeOut,startPoint:9}); var myTween:Tween = new Tween(mc, "y", Regular.easeInOut, mc.y,0 , 0.5, true); var myTween1:Tween = new Tween(mc, "x", Regular.easeInOut, mc.x,0 , 0.5, true); //myTween.addEventListener(TweenEvent.MOTION_FINISH, onFinish); /*1、淡入淡出效果 import fl.transitions.*; import fl.transitions.easing.*; TransitionManager.start(mc, {type:Iris, direction:Transition.IN, duration:5,easing:Strong.easeOut}); 2、飞入效果 import fl.transitions.*; import fl.transitions.easing.*; TransitionManager.start(mc, {type:Fly, direction:Transition.IN, duration:20,easing:Strong.easeOut,startPoint:9}); 3、光圈过度效果 import fl.transitions.*; import fl.transitions.easing.*; TransitionManager.start(mc, {type:Iris, direction:Transition.IN, duration:10,easing:Strong.easeOut, startPoint:5, shape:Iris.CIRCLE}); 4、划入过度效果 import fl.transitions.*; import fl.transitions.easing.*; TransitionManager.start(mc, {type:Wipe, direction:Transition.IN, duration:10,easing:None.easeNone, startPoint:1}); 5、挤压过度效果 import fl.transitions.*; import fl.transitions.easing.*; TransitionManager.start(mc, {type:Squeeze, direction:Transition.IN, duration:10,easing:Elastic.easeOut, dimension:1}); 6、切换效果 import fl.transitions.*; import fl.transitions.easing.*; TransitionManager.start(mc, {type:Blinds, direction:Transition.OUT, duration:10,easing:None.easeNone, numStrips:20, dimension:1}); 7、缩放过度效果 import fl.transitions.*; import fl.transitions.easing.*; TransitionManager.start(mc, {type:Zoom, direction:Transition.IN, duration:10,easing:None.easeNone}); 8、像素溶解效果 import fl.transitions.*; import fl.transitions.easing.*; TransitionManager.start(mc, {type:PixelDissolve, direction:Transition.IN, duration:10,easing:Regular.easeIn, xSections:30, ySections:30}); 9、旋转过度效果 import fl.transitions.*; import fl.transitions.easing.*; TransitionManager.start(mc, {type:Rotate, direction:Transition.IN, duration:10,easing:Strong.easeInOut, ccw:false, degrees:1080}); 10、照片过度效果 import fl.transitions.*; import fl.transitions.easing.*; TransitionManager.start(mc, {type:Photo, direction:Transition.IN, duration:20,easing:None.easeNone}); */ /*import fl.transitions.Tween; import fl.transitions.easing.*; import flash.events.MouseEvent; import fl.transitions.TweenEvent; var myTween:Tween; var myTween1:Tween; mc.addEventListener(MouseEvent.CLICK,onClick); function onClick(e:MouseEvent):void { switch (e.target) { case mc : mc.removeEventListener(MouseEvent.CLICK,onClick); myTween = new Tween(mc,"y",Regular.easeInOut,mc.y,mc1.y,0.3,true); myTween1 = new Tween(mc1,"y",Regular.easeInOut,mc1.y,mc.y,0.5,true); myTween1.addEventListener(TweenEvent.MOTION_FINISH,onFinish); break; case mc1 : mc1.removeEventListener(MouseEvent.CLICK,onClick); myTween = new Tween(mc,"y",Regular.easeInOut,mc.y,mc1.y,0.3,true); myTween1 = new Tween(mc1,"y",Regular.easeInOut,mc1.y,mc.y,0.5,true); myTween.addEventListener(TweenEvent.MOTION_FINISH,onFinish); break; } } function onFinish(e:TweenEvent):void { switch (e.target) { case myTween1 : mc1.addEventListener(MouseEvent.CLICK,onClick); break; case myTween : mc.addEventListener(MouseEvent.CLICK,onClick); break; } }*/