Flash AS3:在帧到帧上补间 MC 到 MC
我正在尝试在 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);
}
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 5th frame that is triggered on mouse events)
gotoAndPlay(1);
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论