发现flash内置的动画转场类,very棒的!
今天本来是想用tween类的,在帮助文档里面篇来篇去,突然发现了这个动画场类,嘿,好东东。
研究了两小时,做了个SWF供自己以后做转场的时候粘代码用。
点击这里可以看看效果
(地址已被和谐)
此处包含一个多媒体文件,请用网页方式查看。
直接点击绿字就可以看效果了。下部的代码可以直接制作使用。
下面是下载地址:
https://files.cnblogs.com/pelephone/mc%E8%BD%AC%E5%9C%BA%E4%BB%A3%E7%A0%81.rar
顺便再贴一个我搜集的小广告转场地址
下面是源码
import flash.events.*;
import fl.transitions.*;
import fl.transitions.easing.*;
BlindsBtn.addEventListener(MouseEvent.CLICK, BlindsBtnfun);
function BlindsBtnfun(e:MouseEvent) {
TransitionManager.start(img1_mc, {type:Blinds, direction:Transition.IN, duration:2, easing:None.easeNone, numStrips:10, dimension:0});
txt.text="import fl.transitions.*;\nimport fl.transitions.easing.*;";
txt.appendText("\nTransitionManager.start(img1_mc, {type:Blinds, direction:Transition.IN, duration:2, easing:None.easeNone, numStrips:10, dimension:0});");
}
FadeBtn.addEventListener(MouseEvent.CLICK, FadeBtnfun);
function FadeBtnfun(e:MouseEvent) {
TransitionManager.start(img1_mc, {type:Fade, direction:Transition.IN, duration:9, easing:Strong.easeOut});
txt.text="import fl.transitions.*;\nimport fl.transitions.easing.*;";
txt.appendText("\nTransitionManager.start(img1_mc, {type:Fade, direction:Transition.IN, duration:9, easing:Strong.easeOut});");
}
FlyBtn.addEventListener(MouseEvent.CLICK, FlyBtnfun);
function FlyBtnfun(e:MouseEvent) {
TransitionManager.start(img1_mc, {type:Fly, direction:Transition.IN, duration:3, easing:Elastic.easeOut, startPoint:9});
txt.text="import fl.transitions.*;\nimport fl.transitions.easing.*;";
txt.appendText("\nTransitionManager.start(img1_mc, {type:Fly, direction:Transition.IN, duration:3, easing:Elastic.easeOut, startPoint:9}); ");
}
IrisBtn.addEventListener(MouseEvent.CLICK, IrisBtnfun);
function IrisBtnfun(e:MouseEvent) {
TransitionManager.start(img1_mc, {type:Iris, direction:Transition.IN, duration:2, easing:Strong.easeOut, startPoint:5, shape:Iris.CIRCLE});
txt.text="import fl.transitions.*;\nimport fl.transitions.easing.*;";
txt.appendText("\n TransitionManager.start(img1_mc, {type:Iris, direction:Transition.IN, duration:2, easing:Strong.easeOut, startPoint:5, shape:Iris.CIRCLE});");
}
PhotoBtn.addEventListener(MouseEvent.CLICK, PhotoBtnfun);
function PhotoBtnfun(e:MouseEvent) {
TransitionManager.start (img1_mc, {type:Photo, direction:Transition.IN, duration:1, easing:None.easeNone});
txt.text="import fl.transitions.*;\nimport fl.transitions.easing.*;";
txt.appendText("\n TransitionManager.start (img1_mc, {type:Photo, direction:Transition.IN, duration:1, easing:None.easeNone});");
}
PixelDissolveBtn.addEventListener(MouseEvent.CLICK, PixelDissolveBtnfun);
function PixelDissolveBtnfun(e:MouseEvent) {
TransitionManager.start(img1_mc, {type:PixelDissolve, direction:Transition.IN, duration:2, easing:Regular.easeIn, xSections:10, ySections:10});
txt.text="import fl.transitions.*;\nimport fl.transitions.easing.*;";
txt.appendText("\nTransitionManager.start(img1_mc, {type:PixelDissolve, direction:Transition.IN, duration:2, easing:Regular.easeIn, xSections:10, ySections:10});");
}
RotateBtn.addEventListener(MouseEvent.CLICK, RotateBtnfun);
function RotateBtnfun(e:MouseEvent) {
TransitionManager.start(img1_mc, {type:Rotate, direction:Transition.IN, duration:3, easing:Strong.easeInOut, ccw:false, degrees:720});
txt.text="import fl.transitions.*;\nimport fl.transitions.easing.*;";
txt.appendText("\nTransitionManager.start(img1_mc, {type:Rotate, direction:Transition.IN, duration:3, easing:Strong.easeInOut, ccw:false, degrees:720});");
}
SqueezeBtn.addEventListener(MouseEvent.CLICK, SqueezeBtnfun);
function SqueezeBtnfun(e:MouseEvent) {
TransitionManager.start(img1_mc, {type:Squeeze, direction:Transition.IN, duration:2, easing:Elastic.easeOut, dimension:1});
txt.text="import fl.transitions.*;\nimport fl.transitions.easing.*;";
txt.appendText("\nTransitionManager.start(img1_mc, {type:Squeeze, direction:Transition.IN, duration:2, easing:Elastic.easeOut, dimension:1});");
}
WipeBtn.addEventListener(MouseEvent.CLICK, WipeBtnfun);
function WipeBtnfun(e:MouseEvent) {
TransitionManager.start(img1_mc, {type:Wipe, direction:Transition.IN, duration:2, easing:None.easeNone, startPoint:1});
txt.text="import fl.transitions.*;\nimport fl.transitions.easing.*;";
txt.appendText("\nTransitionManager.start(img1_mc, {type:Wipe, direction:Transition.IN, duration:2, easing:None.easeNone, startPoint:1}); ");
}
ZoomBtn.addEventListener(MouseEvent.CLICK, ZoomBtnfun);
function ZoomBtnfun(e:MouseEvent) {
TransitionManager.start(img1_mc, {type:Zoom, direction:Transition.IN, duration:2, easing:Elastic.easeOut});
txt.text="import fl.transitions.*;\nimport fl.transitions.easing.*;";
txt.appendText("\nTransitionManager.start(img1_mc, {type:Zoom, direction:Transition.IN, duration:2, easing:Elastic.easeOut});");
}