# Looping audio

**URL:** <https://forum.kirupa.com/t/looping-audio/266673>\
**Category:** flash\
**Created:** [July 23, 2008, 10:25am UTC](https://forum.kirupa.com/t/looping-audio/266673 "2008-07-23T10:25:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pritchie88](https://avatars.discourse-cdn.com/v4/letter/p/ed8c4c/32.png) [@pritchie88](https://forum.kirupa.com/u/pritchie88)\
**Post date:** [July 23, 2008, 10:25am UTC](https://forum.kirupa.com/t/looping-audio/266673/1 "2008-07-23T10:25:19Z")

</div>

Can’t get my music track to loop. I’ve managed to get a piece of audio playing when a user enters my page and am able to adjust the volume with the slider control which I got from the one of the Kirupa tutorials, but I can’t work out how to make the mp3 track loop. It stops after one play back? any ideas? thanks in advance : ) Heres the code I’m using:

onClipEvent (load) {  
mySound = new Sound();  
mySound.loadSound("/flash/sound2.mp3", true);  
//set the default volume to whatever you want here  
\_root.volume = 30;  
}  
onClipEvent (enterFrame) {  
downloaded = mySound.getBytesLoaded();  
total = mySound.getBytesTotal();  
if (downloaded != total) {  
\_root.dl = “downloading song…”;  
} else {  
complete = 1;  
\_root.dl = “”;  
}  
mySound.setVolume(\_root.volume\*2);  
}
