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.
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.
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.
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.