# Sound Loop

**URL:** <https://forum.kirupa.com/t/sound-loop/92676>\
**Category:** Uncategorized\
**Created:** [October 20, 2003, 2:47pm UTC](https://forum.kirupa.com/t/sound-loop/92676 "2003-10-20T14:47:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![neverrain](https://avatars.discourse-cdn.com/v4/letter/n/919ad9/32.png) [@neverrain](https://forum.kirupa.com/u/neverrain)\
**Post date:** [October 20, 2003, 2:47pm UTC](https://forum.kirupa.com/t/sound-loop/92676/1 "2003-10-20T14:47:26Z")

</div>

Hi,

Does anyone know the code to loop an externally loaded sound? The loop is about 5 seconds but I would like to loop it 30 times making it much longer.

Here is my code to load it.

on (press) {  
stopAllSounds();  
}  
on (release) {  
mySound = new Sound();  
mySound.loadSound(“music/ambient.mp3”, true);  
}

Thanks.
