これが私のメインフレームのコードです。コードを上から下に 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 秒間だけ機能し続けることは可能ですか? 基本的に、それぞれ15秒で3回再生するには、「doStuff」関数が必要です。