# Sound problem

**URL:** <https://forum.kirupa.com/t/sound-problem/6443>\
**Category:** Uncategorized\
**Created:** [October 7, 2002, 4:28pm UTC](https://forum.kirupa.com/t/sound-problem/6443 "2002-10-07T16:28:51Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![novatake](https://avatars.discourse-cdn.com/v4/letter/n/e47774/32.png) [@novatake](https://forum.kirupa.com/u/novatake)\
**Post date:** [October 7, 2002, 4:28pm UTC](https://forum.kirupa.com/t/sound-problem/6443/1 "2002-10-07T16:28:51Z")

</div>

I am tryin to add sound to my flash site and its proving difficult.  
I want to sound to loop but in my movie i have a ()stop function  
So i need to do it with action script i want it to play automatically after it has all loaded does any1 know how to do it

-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:** [October 7, 2002, 4:37pm UTC](https://forum.kirupa.com/t/sound-problem/6443/2 "2002-10-07T16:37:26Z")

</div>

Yep…

```auto
on (release) {
	mySound = new Sound(this);
	mySound.attachSound("myMusic");
	mySound.start(0, 99);
}

```

Now open your library, right click on the sound you want to load, choose “linkage…”. Select the checkbox that says “Export for Actionscript” then give it the name “myMusic” (without quotes).

99 is the amount of loops.

---

<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:** [October 7, 2002, 4:48pm UTC](https://forum.kirupa.com/t/sound-problem/6443/3 "2002-10-07T16:48:23Z")

</div>

cheers but that is for a button i need it to load automatically  
So On(release) doesnt work  
and how cum my preloader doesnt work with that

-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:** [October 7, 2002, 4:52pm UTC](https://forum.kirupa.com/t/sound-problem/6443/4 "2002-10-07T16:52:12Z")

</div>

Oh, duh me, That is what I get for taking that from a file on my computer about sound on off buttons.

```auto
	mySound = new Sound(this);
	mySound.attachSound("myMusic");
	mySound.start(0, 99);

```

Just add that code to your frame, tah dah.

What do you mean about your preloader?

---

<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:** [October 7, 2002, 4:59pm UTC](https://forum.kirupa.com/t/sound-problem/6443/5 "2002-10-07T16:59:45Z")

</div>

well when i have a sound layer the preloader doesnt load up and i dont know why it just freezes do i need to sound layer in any particular place.

Im also only using a loader component up to now

-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:** [October 7, 2002, 5:04pm UTC](https://forum.kirupa.com/t/sound-problem/6443/6 "2002-10-07T17:04:33Z")

</div>

Try adding the sound actions AFTER your preloader. That should work.

I don’t know anything about the preloader component, but considering the many posts here about problems with it, I am not sure I even want to try it.

---

<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:** [October 7, 2002, 5:06pm UTC](https://forum.kirupa.com/t/sound-problem/6443/7 "2002-10-07T17:06:10Z")

</div>

the sound is after the preloader component ill figure it out i hope

-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:** [October 7, 2002, 5:18pm UTC](https://forum.kirupa.com/t/sound-problem/6443/8 "2002-10-07T17:18:31Z")

</div>

Just a theory, but since I am supposing you can designate the action for if all the frames are loaded.

You can insert the code there.

so its like if the frames are loaded, goto and play whatever, and then add the sound code after that.

Again just theory, but I guess it is worth a try.

---

<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:** [October 7, 2002, 5:22pm UTC](https://forum.kirupa.com/t/sound-problem/6443/9 "2002-10-07T17:22:41Z")

</div>

cheers ill try it out

---

<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:** [October 7, 2002, 5:24pm UTC](https://forum.kirupa.com/t/sound-problem/6443/10 "2002-10-07T17:24:06Z")

</div>

No problem. I hope it works out.

---

<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:** [October 7, 2002, 5:43pm UTC](https://forum.kirupa.com/t/sound-problem/6443/11 "2002-10-07T17:43:58Z")

</div>

no luck if u would be able to look at the fla for me i’d be grateful but i cant attach it coz its too big i think

-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:** [October 7, 2002, 5:46pm UTC](https://forum.kirupa.com/t/sound-problem/6443/12 "2002-10-07T17:46:17Z")

</div>

Do you have a server you could upload to so I can download it?

---

<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:** [October 7, 2002, 7:55pm UTC](https://forum.kirupa.com/t/sound-problem/6443/13 "2002-10-07T19:55:24Z")

</div>

ok [members.aol.com/notnowtom/private/site.zip](http://members.aol.com/notnowtom/private/site.zip)

that should let u download if it doesnt i have msn messenger i can send it over that

-Tom

or just email it

---

<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:** [October 7, 2002, 8:49pm UTC](https://forum.kirupa.com/t/sound-problem/6443/14 "2002-10-07T20:49:25Z")

</div>

Very interesting. I don’t know enough to know how to fix it.

I think I know why it doesn’t work though. I think it starts loading the song because it is in the library and it is loading the library beforehand. Just theory (me and my theories)

Anywho, you can try dynamically loading it into Flash…

[http://www.kirupa.com/developer/mx/loading.asp](http://www.kirupa.com/developer/mx/loading.asp)
