我正在尝试在 Flash CS3 中构建一个四帧动画。背景图像(每个都设置为 MovieClips)在每一帧上都会发生变化,我想在每个 MC 上放置一个淡出/淡入过渡。不过,我似乎无法正常工作。这是我的代码:
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 5th frame that is triggered on mouse events)
gotoAndPlay(1);
}