Hi guys!
I have a very simple piece of code here. Check it out:
import flash.media.SoundChannel;
import flash.media.Sound;
import flash.net.URLRequest;
import flash.events.Event;
var sc:SoundChannel = new SoundChannel();
var s:Sound = new Sound();
s.addEventListener(Event.COMPLETE, onComplete);
s.load(new URLRequest("song.mp3"));
function onComplete(evenet:Event):void
{
sc = s.play();
}
The question is: does the sound start to play when it is loaded completely or when loader has found “song.mp3”? How it all works? May be someone can explain me or give some nice info-link?