专题文章
时长:00:00更新时间:2024-10-25 05:56:21
把以下代码插入你要暂停播放的那一帧,播放到那一帧就会停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
查看详情