gpt4 book ai didi

actionscript-3 - 在这种情况下如何循环 timelinemax 动画

转载 作者:行者123 更新时间:2023-12-04 06:39:29 31 4
gpt4 key购买 nike

我有这个代码:

import com.greensock.*;
import com.greensock.easing.*;
import com.greensock.events.*;

var timeline:TimelineMax = new TimelineMax({yoyo:true,repeat:1});
var timeline2:TimelineMax = new TimelineMax({repeat:0,delay:12});

timeline.appendMultiple([
TweenLite.from(crno_mc, .2, {x:-450,ease:Cubic.easeInOut}),
TweenLite.from(plavo_mc, .2, {x:-450,ease:Cubic.easeInOut}),
TweenLite.from(network_mc, .6, {x:-450,ease:Cubic.easeInOut}),
TweenLite.from(computers_mc, .6, {x:-450,ease:Cubic.easeInOut}),
TweenLite.from(odzaci_mc, .6, {x:-450,ease:Cubic.easeInOut}),
TweenLite.from(adresa_mc, 1, {x:-350,ease:Cubic.easeInOut}),
TweenLite.to(adresa_mc, 1, {x:50,ease:Cubic.easeInOut}),
], 1, TweenAlign.SEQUENCE, .3);


timeline2.appendMultiple([
TweenLite.to(krediti_mc, .2, {x:10,ease:Cubic.easeInOut}),
TweenLite.to(dodva_mc, .3, {x:10,ease:Cubic.easeInOut}),
TweenLite.to(nula_mc, 1, {x:10,ease:Bounce.easeOut}),
TweenLite.to(tel_mc, .6, {x:10,ease:Cubic.easeInOut}),
TweenLite.to(comp_mc, 1, {x:110,ease:Cubic.easeInOut}),
], 1, TweenAlign.SEQUENCE, .5);

如何循环这两个补间?当第二个动画完成时,它就停止了。是否可以在无限循环中一个接一个地运行时间线?

谢谢

最佳答案

您可以根据需要在时间线中嵌套时间线,因此您可以简单地将两个时间线附加到具有重复:-1(表示永远重复)的主时间线。在现有代码下方添加:

var master:TimelineMax = new TimelineMax({repeat:-1});
master.append(timeline);
master.append(timeline2);

关于actionscript-3 - 在这种情况下如何循环 timelinemax 动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11776893/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com