# How to loop external mp3 file?

**URL:** https://forum.kirupa.com/t/how-to-loop-external-mp3-file/111574
**Category:** Uncategorized
**Created:** [May 28, 2004, 9:29am UTC](https://forum.kirupa.com/t/how-to-loop-external-mp3-file/111574 "2004-05-28T09:29:47Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![vijayraj\_bhatt](https://avatars.discourse-cdn.com/v4/letter/v/0ea827/32.png) [@vijayraj\_bhatt](https://forum.kirupa.com/u/vijayraj_bhatt)
#### Post date: [May 28, 2004, 9:29am UTC](https://forum.kirupa.com/t/how-to-loop-external-mp3-file/111574/1 "2004-05-28T09:29:47Z")

</div>

Hi all,

In my flash movie i’ve loaded external mp3 file (rap.mp3)  
code which i used is as per below.

on (release) {  
stopAllSounds();  
mySound = new Sound();  
mySound.loadSound(“rap.mp3”, true);  
mySound.start();  
}

now i can hear sound when i release my button.

My problem is … It plays only once.

& i need to loop that sound till i stop it or press another sound button.

Bottom line is i need to loop my external mp3 file .

Plz help if u can…

I m not sure but may be we can use OnSoundComplete handler for that !!!

Plz try… & tell me how to do this.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 28, 2004, 10:07am UTC](https://forum.kirupa.com/t/how-to-loop-external-mp3-file/111574/2 "2004-05-28T10:07:09Z")

</div>

hey right dont qoute me on how accurate this is because im at college and i havent got my actionscript dictionary on my college network anyway. ts something like in the mySound.start(); bit put mySound.start(9999); or something like that. There is a tutorial on kirupa for external mp3s which ive never had any problems with. But i totally cant find it lol have a look its within another tutorial i think

hope this kinda helps  
-Tom

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 28, 2004, 10:07am UTC](https://forum.kirupa.com/t/how-to-loop-external-mp3-file/111574/3 "2004-05-28T10:07:49Z")

</div>

or it could be 0, 9999 lol :cyborg:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 28, 2004, 10:56am UTC](https://forum.kirupa.com/t/how-to-loop-external-mp3-file/111574/4 "2004-05-28T10:56:25Z")

</div>

thanks for your quick reply dear,

But it is not working…

any other idea ???

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 28, 2004, 12:29pm UTC](https://forum.kirupa.com/t/how-to-loop-external-mp3-file/111574/5 "2004-05-28T12:29:57Z")

</div>

well from what i gather u can’t use properties like loops or so on streaming media tho what if u jsut loaded all ur mp3s as ur movie is loading then handler ur sounds as events

so have this on ur button

on (release) {  
stopAllSounds();  
rap.start(0,2)  
}

and this in ur actions frame  
rap = new Sound();  
rap.loadSound(“rap.mp3”)  
works for me and u could just make a if loaded kinda script to see if that mp3 is loaded before ladoing he next one so u don;t slow it down to much

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 29, 2004, 5:08am UTC](https://forum.kirupa.com/t/how-to-loop-external-mp3-file/111574/6 "2004-05-29T05:08:55Z")

</div>

soundContainer = new Sound(this);  
soundContainer.attachSound(“mySound.mp3”);  
soundContainer.start(0, 99);

maybe that will work only works if ur externally loading th epages as well i i cant be arsed ready ur post again lol

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 29, 2004, 12:37pm UTC](https://forum.kirupa.com/t/how-to-loop-external-mp3-file/111574/7 "2004-05-29T12:37:23Z")

</div>

Dear I need to Attach External Sound so we can’t use .attachsound  
we have to use .loadSound(sound.mp3)

& after using this (0, 99) is not working…

Any other idea ??? :q:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [May 29, 2004, 1:49pm UTC](https://forum.kirupa.com/t/how-to-loop-external-mp3-file/111574/8 "2004-05-29T13:49:48Z")

</div>

[http://www.kirupaforum.com/forums/showthread.php?t=54742](http://www.kirupaforum.com/forums/showthread.php?t=54742)

scotty(-:
