This content has been marked as final. Show 4 replies
When you deal with sound objects, think of it as controlling the sounds
playing in individual movieclips. Hence if you want to control the volume
of various sounds separately you need to play these sound in different
movieclips and create sound objects linked to the different movieclips too
s = new Sound(target_mc);
If you do not pass a target mc to the Sound Constructor, then the sound
object will default to control the main timeline of your movie. If you
create several sound objects like this:
s1 = new Sound();
s2 = new Sound();
s3 = new Sound();
They actually all control the same timeline which is probably not what you
want to do.
Some additional info:
The createEmptyMovieClip() fix isn't working for me. This is what I tried:
...but no sound would play.
This is how my objects were originally structured:
--+-- Object 1 (movieclip) -- Sound parent (movieclip) -- Sound object (property)
..+-- Object 2 (movieclip) -- Sound parent (movieclip) -- Sound object (property)
I don't see why these objects are interfering with each other, as there is definitely several layers of movie clip separating the two sound objects.
> this.createEmptyMovieClip('sound_object', 50);
> this.start(0, 9999);
The point of creating the empty movieclip is so a timeline exists to play
your sound. After that, you still need to create a Sound object to control
the sound in that timeline. Hence the code should be:
var mc = this.createEmptyMovieClip('sound_object', 50);
this.s = new Sound(mc);
Gotcha! Cheers, that did the trick!