0
애니메이션의 소리를 제어하기 위해 할당 된 1 개의 다시 시작 (onBtn) 및 1 개의 일시 중지 (offBtn) 버튼이 있습니다 ... 일시 중지 버튼은 정상적으로 작동하지만 다시 재생하면 ... 그것은작업 스크립트 3에 음악 다시 시작
import flash.events.Event;
import flash.events.MouseEvent;
onBtn.addEventListener(MouseEvent.CLICK, startMove);
offBtn.addEventListener(MouseEvent.CLICK, stopMove);
var resumeTime:Number = 0;
var isPlaying:Boolean;
var mySound:Sound = new MySong();
var channel1:SoundChannel = new SoundChannel();
onBtn.visible=false;
isPlaying=true;
channel1=mySound.play();
function stopMove(event:MouseEvent):void {
resumeTime=channel1.position;
channel1.stop();
onBtn.visible =true;
offBtn.visible=false;
isPlaying=false;
stop();
}
function startMove(event:MouseEvent):void {
channel1=mySound.play(resumeTime);
onBtn.visible=false;
offBtn.visible=true;
isPlaying=true;
play();
}
내 애니메이션로드 ... – mitche027
이 해결 방법을 함께했다 때 음악이 재생되지 않습니다 그렇게한다면 그 문제와 첫 번째 게시물을 편집했습니다. – khailcs