# Sound Loop doesnt stop sometimes

**URL:** https://forum.kirupa.com/t/sound-loop-doesnt-stop-sometimes/319329
**Category:** flash
**Created:** [February 16, 2011, 2:57pm UTC](https://forum.kirupa.com/t/sound-loop-doesnt-stop-sometimes/319329 "2011-02-16T14:57:03Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![starsoccer10921](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@starsoccer10921](https://forum.kirupa.com/u/starsoccer10921)
#### Post date: [February 16, 2011, 2:57pm UTC](https://forum.kirupa.com/t/sound-loop-doesnt-stop-sometimes/319329/1 "2011-02-16T14:57:03Z")

</div>

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();
