我的代码在 3 个随机图像中加载,我没有使用时间线。我需要在一定时间后重新启动 swf,以便电影可以重新加载新图像并重播电影。就目前而言,它不会循环。
import com.greensock.*;
import com.greensock.easing.*
box1.back.rotationY = -90;
box1.back.alpha=0;
var flipSpeed:Number = .25;
var tl:TimelineMax = new TimelineMax({delay:2});
tl.append(TweenMax.to(box1.front, flipSpeed, {rotationY:90, visible:false, ease:Linear.easeNone}))
tl.append(TweenMax.to(box1.back, 0, {alpha:1, immediateRender:false}))
tl.append(TweenMax.to(box1.back, flipSpeed, {rotationY:0, ease:Linear.easeNone}))
var tb:TimelineMax = new TimelineMax({delay:4});
box2.back2.rotationY = -90;
box2.back2.alpha=0;
tb.append(TweenMax.to(box2.front2, flipSpeed, {rotationY:90, visible:false, ease:Linear.easeNone}))
tb.append(TweenMax.to(box2.back2, 0, {alpha:1, immediateRender:false}))
tb.append(TweenMax.to(box2.back2, flipSpeed, {rotationY:0, ease:Linear.easeNone}))
var ins:TimelineMax = new TimelineMax({delay:6});
box3.back3.rotationY = -90;
box3.back3.alpha=0;
ins.append(TweenMax.to(box3.front3, flipSpeed, {rotationY:90, visible:false, ease:Linear.easeNone}))
ins.append(TweenMax.to(box3.back3, 0, {alpha:1, immediateRender:false}))
ins.append(TweenMax.to(box3.back3, flipSpeed, {rotationY:0, ease:Linear.easeNone}))
var per:TimelineMax = new TimelineMax({delay:7});
person.back_person.rotationY = -90;
person.back_person.alpha=0;
per.append(TweenMax.to(person.front_person, flipSpeed, {rotationY:90, visible:false, ease:Linear.easeNone}))
per.append(TweenMax.to(person.back_person, 0, {alpha:1, immediateRender:false}))
per.append(TweenMax.to(person.back_person, flipSpeed, {rotationY:0, ease:Linear.easeNone}));
-- 我在movieclips 中也有内容,这些内容从XML 文档中加载图像,但这是我在主要动作层上的内容。