# Music

**URL:** <https://forum.kirupa.com/t/music/57011>\
**Category:** Uncategorized\
**Created:** [July 9, 2004, 3:35pm UTC](https://forum.kirupa.com/t/music/57011 "2004-07-09T15:35:42Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![bman\_006](https://avatars.discourse-cdn.com/v4/letter/b/50afbb/32.png) [@bman\_006](https://forum.kirupa.com/u/bman_006)\
**Post date:** [July 9, 2004, 3:35pm UTC](https://forum.kirupa.com/t/music/57011/1 "2004-07-09T15:35:42Z")

</div>

well, in my flash video, i want an music file (.wav) to load after a certian frame, but i want the music to keep looping too. where i want the mp3 to load, its the end of the flash movie so nothing else happens during the song. any help would be great 😛

---

<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:** [July 9, 2004, 5:01pm UTC](https://forum.kirupa.com/t/music/57011/2 "2004-07-09T17:01:16Z")

</div>

Wait - so you want to load the wav (mp3 and wavs are different) at the end of the movie and you want the music to keep looping?

---

<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:** [July 9, 2004, 5:44pm UTC](https://forum.kirupa.com/t/music/57011/3 "2004-07-09T17:44:04Z")

</div>

> [@The Reefster](#):
>
> Wait - so you want to load the wav (mp3 and wavs are different) at the end of the movie and you want the music to keep looping?

yes, thats what i want to do. i can convert the .wav to .mp3 if i really need too.

---

<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:** [July 9, 2004, 6:07pm UTC](https://forum.kirupa.com/t/music/57011/4 "2004-07-09T18:07:45Z")

</div>

```auto
mySound = new Sound();
mySound.attachSound("Sound File URL");
mySound.onLoad = function () {
	mySound.start(0, 999);
}

```

Put this in the last frame. 999 is the times it loops. Make sure you enter the URL. Untested - came off my head.

---

<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:** [July 10, 2004, 1:00am UTC](https://forum.kirupa.com/t/music/57011/5 "2004-07-10T01:00:16Z")

</div>

> [@The Reefster](#):
>
> ```auto
> mySound = new Sound();
> mySound.attachSound("Sound File URL");
> mySound.onLoad = function () {
> mySound.start(0, 999);
> }
> 
> ```
> 
> Put this in the last frame. 999 is the times it loops. Make sure you enter the URL. Untested - came off my head.

ok, when u mean URL do u mean the location of the .wav in my computer, or does it have to be on the internet?

i just tried putting the code in, it looks like this…

mySound = new Sound();  
mySound.attachSound(“C:/my documents/my music/bgmusic.wav”);  
mySound.onLoad = function () {  
mySound.start(0, 999);  
}

is something wrong?

---

<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:** [July 10, 2004, 1:06am UTC](https://forum.kirupa.com/t/music/57011/6 "2004-07-10T01:06:00Z")

</div>

Whichever one the file is stored in.

Instead of C:/my documents/my music/bgmusic.wav try this:

**C:\my documents\my music\bgmusic.wav**

Yes leave those 2 back-slashed :).

---

<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:** [July 10, 2004, 1:26am UTC](https://forum.kirupa.com/t/music/57011/7 "2004-07-10T01:26:18Z")

</div>

> [@The Reefster](#):
>
> Whichever one the file is stored in.
> 
> Instead of C:/my documents/my music/bgmusic.wav try this:
> 
> **C:\my documents\my music\bgmusic.wav**
> 
> Yes leave those 2 back-slashed :).

lol, it still didnt work :P. well, what i want is, i want the music to start at a certian frame, but when the music starts, all the animations are over. so, i want the animation to stop after the music starts, but i want the music to keep looping. when i did put my sound in, the sound started, then the animation started over like it normally would, and it would load up the mp3 again. so, should i put a stop in the actions too? i have about 7 layers in my flash, do i have to put the code in every layer?

---

<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:** [July 10, 2004, 5:47pm UTC](https://forum.kirupa.com/t/music/57011/8 "2004-07-10T17:47:38Z")

</div>

_Shoots Self_

Yes! Of course you have to put a stop action on the last frame.

Ah your killing me :P.

---

<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:** [July 10, 2004, 6:03pm UTC](https://forum.kirupa.com/t/music/57011/9 "2004-07-10T18:03:24Z")

</div>

> [@The Reefster](#):
>
> _Shoots Self_
> 
> Yes! Of course you have to put a stop action on the last frame.
> 
> Ah your killing me :P.

lmao i tried that too and it STILL didnt work. it played but then it didnt loop.
