# Movie loading Issues...(Sound)

**URL:** https://forum.kirupa.com/t/movie-loading-issues-sound/16686
**Category:** flash
**Created:** [March 27, 2003, 2:24pm UTC](https://forum.kirupa.com/t/movie-loading-issues-sound/16686 "2003-03-27T14:24:31Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![drew\_down](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@drew\_down](https://forum.kirupa.com/u/drew_down)
#### Post date: [March 27, 2003, 2:24pm UTC](https://forum.kirupa.com/t/movie-loading-issues-sound/16686/1 "2003-03-27T14:24:31Z")

</div>

I have been working on this one site. The idea is to have an External swf. load into a movie clip called contents in my index movie. The External .swf should not play until the play button is released. This is all working great. But My audio which is attached  
ie…attachsound, is not playing, it is on my server already and all that. Any ideas… This is like my only problem before completion

Drew

---

<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: [March 27, 2003, 3:27pm UTC](https://forum.kirupa.com/t/movie-loading-issues-sound/16686/2 "2003-03-27T15:27:59Z")

</div>

that’s a bit confusing… :-\

> But My audio which is attached ie…attachsound

makes me think that you have the sound in the library of your movie…

> it is on my server already and all that

makes me think that you want to load the sound dynamically…

??

---

<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: [March 27, 2003, 3:34pm UTC](https://forum.kirupa.com/t/movie-loading-issues-sound/16686/3 "2003-03-27T15:34:06Z")

</div>

I would like the sound to be loaded of my server… And I guess your right! I am doing something wrong because I think I am trying to do both at the same time…

But I don’t know where I am doing 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: [March 27, 2003, 3:45pm UTC](https://forum.kirupa.com/t/movie-loading-issues-sound/16686/4 "2003-03-27T15:45:29Z")

</div>

ok… =)

loading sound dynamically.

stream.

```auto
mySound = new Sound();
mySound.loadSound("mySound.mp3", true);

```

no stream.

```auto
mySound = new Sound();
mySound.loadSound("mySound.mp3");
mySound.onLoad = function() {
this.start();
}

```

attaching sound from library.

```auto
mySound = new Sound();
mySound.attachSound("mySound");
mySound.start();

```

and don’t forget to put the id name in the linkage properties of the sound in the library.

hope it helps 😉 =)

---

<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: [March 27, 2003, 3:57pm UTC](https://forum.kirupa.com/t/movie-loading-issues-sound/16686/5 "2003-03-27T15:57:49Z")

</div>

A common error in loaded movies and sound objects is that the sound object is not getting the correct reference when created.  
use mySound = new Sound( **this** ); so your sound is referencing the correct clip (ie the loaded swf)

---

<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: [March 27, 2003, 3:59pm UTC](https://forum.kirupa.com/t/movie-loading-issues-sound/16686/6 "2003-03-27T15:59:59Z")

</div>

This is my code does this look correct?

stop();  
\_root.contents.speaker.stop();  
\_root.contents.speaker2.stop();  
mySound = new Sound(this);  
mySound.loadSound(“DNS\_Say My Name Remix.mp3”, true);  
\_root.contents.playButton.onRelease = function() {  
song.play();  
\_root.contents.speaker.play();  
\_root.contents.speaker2.play();  
song.onSoundComplete = function() {  
\_root.contents.speaker.stop();  
\_root.contents.speaker2.stop();  
};  
};

---

<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: [March 27, 2003, 4:07pm UTC](https://forum.kirupa.com/t/movie-loading-issues-sound/16686/7 "2003-03-27T16:07:42Z")

</div>

> _Originally posted by senocular_  
> **A common error in loaded movies and sound objects is that the sound object is not getting the correct reference when created.  
> use mySound = new Sound(this); so your sound is referencing the correct clip (ie the loaded swf)**

i thought that leaving the parameter empty the sound object is referenced to the movie clip where is created… am i wrong then?

---

<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: [March 27, 2003, 4:11pm UTC](https://forum.kirupa.com/t/movie-loading-issues-sound/16686/8 "2003-03-27T16:11:00Z")

</div>

I put the code the way i have it in my music.swf which loadeds into a "Contents"mc in my index movie.  
The audio is supposed to start playing when you hit the play button and now it is not doing that it is only playing on load?

Drew

---

<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: [March 27, 2003, 4:13pm UTC](https://forum.kirupa.com/t/movie-loading-issues-sound/16686/9 "2003-03-27T16:13:10Z")

</div>

Kax you helped me with this before, but since i am now loading .swf files into my Index movie it stopped working!

That’s what’s funkin me up right now…

---

<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: [March 27, 2003, 4:20pm UTC](https://forum.kirupa.com/t/movie-loading-issues-sound/16686/10 "2003-03-27T16:20:57Z")

</div>

i think you have a problem here:

```auto
stop();
_root.contents.speaker.stop();
_root.contents.speaker2.stop();
**mySound = new Sound(this);
mySound.loadSound("DNS_Say My Name Remix.mp3", true);**
_root.contents.playButton.onRelease = function() {
**song.play();**
_root.contents.speaker.play();
_root.contents.speaker2.play();
**song.onSoundComplete = function() {
_root.contents.speaker.stop();
_root.contents.speaker2.stop();
}**
}

```

first you define the sound object as **mySound** … and then you’re trying to target the sound object as **song**? or **song** is another sound object?

---

<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: [March 27, 2003, 4:26pm UTC](https://forum.kirupa.com/t/movie-loading-issues-sound/16686/11 "2003-03-27T16:26:32Z")

</div>

There is only one sound object

---

<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: [March 27, 2003, 4:29pm UTC](https://forum.kirupa.com/t/movie-loading-issues-sound/16686/12 "2003-03-27T16:29:33Z")

</div>

then replace **song** with **mySound** or **mySound** with **song** 😛 😉

---

<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: [March 27, 2003, 4:32pm UTC](https://forum.kirupa.com/t/movie-loading-issues-sound/16686/13 "2003-03-27T16:32:19Z")

</div>

ok i will try…

I remember having to check stop in the Audio sync window is this true still, to make it so the musci doesn’t play on load only on the release of the play button
