flash怎么让一个动画播放后停顿一会再播下一个?
来源:懂视网
责编:小OO
时间:2024-10-25 05:56:21
flash怎么让一个动画播放后停顿一会再播下一个?
把以下代码插入你要暂停播放的那一帧,播放到那一帧就会停5秒,然后继续播放。varstopTime:Number=5stop()vartimeCounter:int=0this.addEventListener(Event.ENTER_FRAME,stopAndPlay)functionstopAndPlay(e:Event){timeCounter++if(timeCounter>stopTime*stage.frameRate){this.removeEventListener(Event.ENTER_FRAME,stopAndPlay)play()}}注:如果想停10秒,就把第一行改成varstopTime:Number=10
导读把以下代码插入你要暂停播放的那一帧,播放到那一帧就会停5秒,然后继续播放。varstopTime:Number=5stop()vartimeCounter:int=0this.addEventListener(Event.ENTER_FRAME,stopAndPlay)functionstopAndPlay(e:Event){timeCounter++if(timeCounter>stopTime*stage.frameRate){this.removeEventListener(Event.ENTER_FRAME,stopAndPlay)play()}}注:如果想停10秒,就把第一行改成varstopTime:Number=10

把以下代码插入你要暂停播放的那一帧,播放到那一帧就会停5秒,然后继续播放。 var stopTime:Number=5 stop() var timeCounter:int=0 this.addEventListener(Event.ENTER_FRAME,stopAndPlay) function stopAndPlay(e:Event){ timeCounter++ if(timeCounter>stopTime*stage.frameRate){ this.removeEventListener(Event.ENTER_FRAME,stopAndPlay) play() } } 注:如果想停10秒,就把第一行改成var stopTime:Number=10
flash怎么让一个动画播放后停顿一会再播下一个?
把以下代码插入你要暂停播放的那一帧,播放到那一帧就会停5秒,然后继续播放。varstopTime:Number=5stop()vartimeCounter:int=0this.addEventListener(Event.ENTER_FRAME,stopAndPlay)functionstopAndPlay(e:Event){timeCounter++if(timeCounter>stopTime*stage.frameRate){this.removeEventListener(Event.ENTER_FRAME,stopAndPlay)play()}}注:如果想停10秒,就把第一行改成varstopTime:Number=10