Help me with this Sound loop is acting wired. It stop sound sometimes and sometimes it doesnt
var soundReqTele:URLRequest = new URLRequest(“sounds/telephone_ring.mp3”);
var soundTele:Sound = new Sound();
var controller:SoundChannel = new SoundChannel();
soundTele.addEventListener(Event.COMPLETE, soundLoaded);
function soundLoaded(eve:Event):void{
controller = soundTele.play();
controller.stop();
}
function playSnd_Tele(){
controller = soundTele.play(0,int.MAX_VALUE);
}
function stopSnd_Tele(){
controller.stop();
}
soundTele.load(soundReqTele);
/////// to play sound at some frame i used
playSnd_Tele();
/////// to stop sound at some other frame i called this function Function works but sound still continue sometimes and sometimes it stops
stopSnd_Tele();