我正在尝试在Flash CS3中构建一个四帧动画。 背景图像(每个设置为MovieClip)在每个帧上都会发生变化,我想在每个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);
}