![]() (st = snd.play()).addEventListener(Event.SOUND_COMPLETE, repeat) St.removeEventListener(Event.SOUND_COMPLETE, repeat) St.addEventListener(Event.SOUND_COMPLETE, repeat) So this will do the same job: snd = new Sound(new URLRequest("filename.mp3")) Īnd if you really want to loop sound inifinite time for some reason ( int.MAX_VALUE will loop 1s sound for about 68 years, not counting the pause an mp3 causes.) you can write something like this: var st:SoundChannel = snd.play() You also don't need to wait for sound to load before calling play() function. Snd.play(0, int.MAX_VALUE) // There is no way to put "infinite" Snd.addEventListener(Event.COMPLETE, function(e: Event) Var req:URLRequest = new URLRequest("filename.mp3")
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |