# Loaded Sound won't loop

**URL:** https://forum.kirupa.com/t/loaded-sound-wont-loop/99315
**Category:** Uncategorized
**Created:** [January 17, 2004, 3:38am UTC](https://forum.kirupa.com/t/loaded-sound-wont-loop/99315 "2004-01-17T03:38:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![larcho](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@larcho](https://forum.kirupa.com/u/larcho)
#### Post date: [January 17, 2004, 3:38am UTC](https://forum.kirupa.com/t/loaded-sound-wont-loop/99315/1 "2004-01-17T03:38:37Z")

</div>

I don’t know why, but my sound dosn’t loop, even though I set it to loop, here is the complete code:

This is on my 1st frame:  
[AS]  
bg\_music = new Sound(\_root);  
bg\_music.loadSound(“music.mp3”, true);  
bg\_music.stop();  
[/AS]

This is on my sound controler clip, shows the progress of the music playing and stuff:

[AS]  
onClipEvent (enterFrame) {  
var musicloaded = \_root.bg\_music.getBytesLoaded();  
var musictotal = \_root.bg\_music.getBytesTotal();  
var lprogress = Math.round((musicloaded / musictotal) \* 100);  
var musicttime = \_root.bg\_music.duration;  
var musicptime = \_root.bg\_music.position;  
var pprogress = Math.round((musicptime / musicttime) \* 100);  
mc\_loaderbar.\_xscale = lprogress;  
mc\_playedbar.\_xscale = pprogress;

```
if (lprogress &gt;= 30) {
gotoAndPlay(2);
}

```

}  
[/AS]

And this is on my frame 2:  
[AS]  
\_root.bg\_music.start(0,999);  
stop();  
[/AS]

I tried with “loop” too, but the sound just plays once

Please help
