View Full Version : Sound: setVolume Question

02-19-2003, 10:25 PM
Is it possible to have two independent setVolume for two different tracks?

As of right now, I have one sound object on tow different movieclip's timelines. As I drag a movie clip on the Y-axis I want one sound to increase in volume while the second decreases in volume. And then vise versa.

So far, both increase and decrease at the same time. Is it impossible in Flash to have two setVolume actions simultaneously? I thought I could seperate them into two different timelines, while avoiding the root timeline. Again this doesn't work (atleast not for me).

Michael Chen
02-19-2003, 11:25 PM
I think it's possible. However you have to create different sound objects. (something like that ... I'm not too sure myself, but I know it's possible)

02-19-2003, 11:52 PM
I have two sound objects. I'm trying to dig up more information about this.

02-20-2003, 09:21 AM
you must adress the proper object in order to do that.

for examle
globalsound.setVolume(50); will set the globalsound volume to 50%

if you would have something like this:

moviesound1 = new Sound(myMovie);

moviesound1 = new Sound(myMovie);

and then something like
on (enterFrame) {

I don't know if this works but... it should ;)

02-20-2003, 10:50 AM
one MC can't have two sound objects, so if you need two independant sounds you need two movieclips you can assign them to
sound1 = new Sound(movieclip1)
sound2 = new Sound(movieclip2)

then you can access their volume values via sound1.setVolume(X)

02-20-2003, 04:37 PM
Thanks Virusescu and Knebbes.

I do have two seperate objects with seperate sound objects, I guess I'll try it again with Virusescu's idea.

CGTalk Moderation
01-14-2006, 11:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.