2014-05-18 3 views
0

현재 사운드를 재생할 actionscript 용 코드를 작성하려고합니다. 일반적으로 이것은 문제가되지 않지만, 사운드가 끝날 때까지 재생을 시작하지 않는다는 규정으로 사운드를 재생해야합니다. 재생하기 전에 사운드가로드되는지 확인하는 방법이 있습니까? 당신은 다음과 같은 작업을 수행 할 수액션 스크립트에서 사운드 재생

답변

0

은 :

var sound:Sound = new Sound(); 
sound.addEventListener(Event.COMPLETE, onSoundLoaded); 
sound.load(new URLRequest("mySound.mp3")); 

function onSoundLoaded(event:Event):void 
{ 
    var loadedSound:Sound = event.target as Sound; 
    loadedSound.play(); 
} 

this adobe tutorial에서 가져옵니다.

행운을 빕니다!