这是我在我的主机上的代码。我需要页面只从上到下读取代码 3 次。即使你能想到我怎么做才能让它停止 45 秒。对不起,我脑死了,不能再思考了。有什么建议吗?
import com.greensock.*;
import com.greensock.easing.*;
import flash.utils.*;
function doStuff() {
//startValues
box1.back.rotationY = -90;
box1.back.alpha=0;
var flipSpeed:Number = .25;
var flipSpeedbea:Number = .04;
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}))
tl.append(TweenMax.to(box1.front, flipSpeed, {rotationY:0, visible:true, 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}))
tb.append(TweenMax.to(box2.front2, flipSpeed, {rotationY:0, visible:true, 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}))
ins.append(TweenMax.to(box3.front3, flipSpeed, {rotationY:0, visible:true, 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}));
var bea:TimelineMax = new TimelineMax({delay:7});
be_a.bea_back.rotationY = -90;
be_a.bea_back.alpha=0;
bea.append(TweenMax.to(be_a.bea_front, flipSpeedbea, {rotationY:90, visible:false, ease:Linear.easeNone}))
bea.append(TweenMax.to(be_a.bea_back, 0, {alpha:1, immediateRender:false}))
bea.append(TweenMax.to(be_a.bea_back, flipSpeedbea, {rotationY:0, ease:Linear.easeNone}));
bea.append(TweenMax.to(be_a.bea_front, flipSpeedbea, {rotationY:0, visible:true, ease:Linear.easeNone}))
stop();
setTimeout(doStuff, 15000);
}
doStuff();
是否可以在 doStuff 上设置一个函数以仅继续运行 45 秒?基本上我需要功能“doStuff”以每次 15 秒播放 3 次。