创建
利用transitions类轻松创建图片过渡效果
点击查看Flash:
http://space.flash8.net/bbs/attachment.php?aid=311487
主场景第一帧上:
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, {typehoto, direction:Transition.IN, duration:1, easing:None.easeNone});
break;
case 6 :
TransitionManager.start(myMovieClip, {typeixelDissolve, 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);