开发者

Flash AS3: Tween MC to MC on Frame to Frame

开发者 https://www.devze.com 2022-12-08 05:42 出处:网络
I am trying to build a four frame animation in Flash CS3. The background images (each being set to MovieClips) change on each frame, and I want to put a fade out/in transition on each of the MC\'s.

I am trying to build a four frame animation in Flash CS3. The background images (each being set to MovieClips) change on each frame, and I want to put a fade out/in transition on each of the MC's. I can't seem to get this working properly though. Here is the code I have:

if (currentFrame == 1) {
    var alphaTweenOut1:Tween = new Tween (image1, "alpha", Regular.easeOut, 100, 0, 1, true);
    var alphaTweenIn2:Tween = new Tween (image2, "alpha", Regular.easeIn, 0, 100, 3, true);
} else if (currentFrame == 2) {
    var alphaTweenOut2:Tween = new Tween (image2, "alpha", Regular.easeOut, 100, 0, 1, true);
    var alphaTweenIn3:Tween = new Tween (image3, "alpha", Regular.easeIn, 0, 100, 3, true);
} else if (currentFrame == 3) {
    var alphaTweenOut3:Tween = new Tween (image3, "alpha", Regular.easeOut, 100, 0, 1, true);
    var alphaTweenIn4:Tween = new Tween (image4, "alpha", Regular.easeIn, 0, 100, 3, true); 
} else {
    var alphaTweenOut4:Tween = new Tween (image4, "alpha", Regular.easeOut, 100, 0, 1, true);       
    var alphaTweenIn1:Tween = new Tween (image1, "alpha", Regular.easeIn, 0, 100, 3, true);
    //loop back to first frame (there is a 5t开发者_Python百科h frame that is triggered on mouse events)
    gotoAndPlay(1);
}
0

精彩评论

暂无评论...
验证码 换一张
取 消