TransitionManager类应用 as3 淡入淡出

2011-06-08 12:50:27 by 【6yang】, 631 visits, 收藏 | 返回

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});

 

 

下面为FLASH图片过渡代码 因为中间没有停顿,如何修改成过渡后停顿100帧。 myMovieClip.swapDepths(myMovieClip0); var i:Number = 0; function tween(obj) {  i++;  myMovieClip0.gotoAndStop(i-1);  obj.gotoAndStop(i);  import mx.transitions.*;  import mx.transitions.easing.*;  switch (i) {  case 1 :   TransitionManager.start(myMovieClip, {type:Blinds, direction:Transition.IN, duration:2, easing:None.easeNone, numStrips:10, dimension:0});   break;  case 2 :   TransitionManager.start(myMovieClip, {type:Blinds, direction:Transition.IN, duration:2, easing:None.easeNone, numStrips:10, dimension:1});   break;  case 3 :   TransitionManager.start(myMovieClip, {type:Fade, direction:Transition.IN, duration:2, easing:None.easeNone});   break;  case 4 :   TransitionManager.start(myMovieClip, {type:Iris, direction:Transition.IN, duration:2, easing:Strong.easeOut, startPoint:5, shape:Iris.CIRCLE});   break;  case 5 :   TransitionManager.start(myMovieClip, {type:Photo, direction:Transition.IN, duration:1, easing:None.easeNone});   break;  case 6 :   TransitionManager.start(myMovieClip, {type:PixelDissolve, direction:Transition.IN, duration:2, easing:None.easeNone, xSections:20, ySections:20});   break;  case 7 :   TransitionManager.start(myMovieClip, {type:Wipe, direction:Transition.IN, duration:2, easing:None.easeNone, startPoint:1});   break;  case 8 :   TransitionManager.start(myMovieClip, {type:Fade, direction:Transition.IN, duration:2, easing:None.easeNone});   break;  case 9 :   TransitionManager.start(myMovieClip, {type:Wipe, direction:Transition.IN, duration:2, easing:None.easeNone, startPoint:2});   break;  case 10 :   TransitionManager.start(myMovieClip, {type:Wipe, direction:Transition.IN, duration:2, easing:None.easeNone, startPoint:3});   break;  case 11 :   TransitionManager.start(myMovieClip, {type:Wipe, direction:Transition.IN, duration:2, easing:None.easeNone, startPoint:4});   break;  case 12 :   TransitionManager.start(myMovieClip, {type:Wipe, direction:Transition.IN, duration:2, easing:None.easeNone, startPoint:5});   break;  case 13 :   TransitionManager.start(myMovieClip, {type:Wipe, direction:Transition.IN, duration:2, easing:None.easeNone, startPoint:6});   break;  case 14 :   TransitionManager.start(myMovieClip, {type:Wipe, direction:Transition.IN, duration:2, easing:None.easeNone, startPoint:7});   break;  case 15 :   TransitionManager.start(myMovieClip, {type:Wipe, direction:Transition.IN, duration:2, easing:None.easeNone, startPoint:8});   break;  case 16 :   TransitionManager.start(myMovieClip, {type:Wipe, direction:Transition.IN, duration:2, easing:None.easeNone, startPoint:9});   break;  }  count.text = i;  if (i>=16) {   i = 0;  } } myID = setInterval(tween, 2000, myMovieClip);
分享到:
share

    图片原图

    loading

    loading