Bizzar Sound problem }}}}HELP{{{{

Here’s the dilema… First the dynamics of the movie are as such… [COLOR=blue]movie1.swf[/COLOR] is loaded on a level of [COLOR=red]mainstage.swf[/COLOR] .

[COLOR=blue]movie1.swf[/COLOR] has sound triggering with this code (linkage set):

sound1= new Sound();
sound1.attachSound(“housetrack1”);
sound1.start();

[COLOR=blue]movie1.swf[/COLOR] when run works perfectly.

HERE’S THE PROBLEM:

When [COLOR=blue]movie1.swf[/COLOR] is called onto a level in [COLOR=red]mainstage.swf[/COLOR] Like this:
loadMovieNum(“fla/movie1.swf”, 1);
there is no sound.

Appreciate any suggestions.

<:}

Are you sure that it loads the movie but only the sound is missing?

I had a similar problem, I was using a code quite like yours to attach the sound but nothing happened when I played the whole movie. I found that I had to actually publish the mainstage movie that loads onto level 0 with the soundfile in the library, however the controller for the sound(Play, stop ect) is still loaded on another level without the soundfile in it’s library.

Hope this helps ya out dude. Im still new to AS too and I can’t explain the reasoning but I know it worked for me.

*Originally posted by djozusa *
**HERE’S THE PROBLEM:
When [COLOR=blue]movie1.swf[/COLOR] is called onto a level in [COLOR=red]mainstage.swf[/COLOR] Like this:
loadMovieNum(“fla/movie1.swf”, 1);
there is no sound. **

Since your using flash mx, you can load your sound files directly into your movie.

Check out this thread for more information.

http://www.kirupaforum.com/showthread.php?s=&threadid=9670&perpage=15&pagenumber=1

looks like the best way to load sound is like this:

_root.createEmptyMovieClip(“sound_mc”, 10);
sound = new Sound(mySound_mc);
sound.loadSound(“sound.mp3”);
sound.start ();

But I still haven’t gotten it to load in a movie on a different level.

H E L P…

:slight_smile:

sound1= new Sound(this);
sound1.attachSound(“housetrack1”);
sound1.start();

sound1= new Sound(this);
sound1.attachSound(“housetrack1”);
sound1.start();

works by itself BUT when movie1.swf is loaded on a level of mainstage.swf it does not.

are you sure you re-published movie1.swf with that change (and not just re-saved)?

*Originally posted by senocular *
**are you sure you re-published movie1.swf with that change (and not just re-saved)? **

Yes, I double checked that…

The ideal solution would be using this method:

_root.createEmptyMovieClip(“sound_mc”, 10);
sound = new Sound(mySound_mc);
sound.loadSound(“sound.mp3”);
sound.start ();

this is driving me :crazy:

:

just realized I was calling a moving in another directory…

DUH!!!

Thanks for the help!!!

:beam:

FYI the solution I was looking for looks like this

this.createEmptyMovieClip(“mysound_mc”, 10);
sound1 = new Sound(mysound_mc);
sound1.loadSound(“sound.mp3”);
sound1.start();

Thanks to all that helped…

Happy New Year!!

using ‘this’ does the same thing without the need of making an empty movieclip

*Originally posted by senocular *
**using ‘this’ does the same thing without the need of making an empty movieclip **

true, but i see a major difference:

when using:

sound1= new Sound([COLOR=green]this[/COLOR] );
sound1.attachSound(“housetrack1”);
sound1.start();

it adds weight to the movie because it sits in the sound is embeded inside the movie.

[COLOR=green]this[/COLOR] .createEmptyMovieClip(“mysound_mc”, 10);
sound1 = new Sound(mysound_mc);
sound1.loadSound(“sound.mp3”);
sound1.start();

Loads sound dynamically from a directory and reduces movie size.

that doesnt have anything to do with the new movieclip. Besides, loading it in externally or not, if you’re loading it, and in the end its all the same sound and most likely the same size. What you do lose is any compression Flash might have given the MP3 when exported from within the swf. As an external file you have to use whatever compression the MP3 currently has and are left with its current size (when flash might have made it smaller compressing it in the swf). Not something hard to do, changing the compression of the external file if needed, but could be something to be concious of.

good point.

Just wondering if the external mp3 would start streaming or would have to load completely before playing.

you can set an mp3 to be streaming using mySound.loadSound. it takes 2 arguments, one, the url of the sound file, and two a boolean “isStreaming” which is true if you want it to stream, false if not.

mySound.loadSound(“song.mp3”, true); // streams song.mp3

So in the example we were talking about it would have to load fully to play - right?

yes, loaded sounds in that respect which are not set to streaming are considered event sounds and need to be fully loaded befoe playing.