-
multiple sound volume control
i'm having trouble trying to control the volume of multiple sounds in my animation. the volume is meant to change based on the position of the mouse relative to a particular object moving on the screen. each sound is connected to a different object, and so needs to vary independently.
i'm using a Sound1.setVolume(volume1); command, but the volume is changing for all of the sounds together.
any advice?
I see that my question is probably answered in the common problems section, unfortunately i don't quite understand the explanation. the uniquesound to mc? can anyone elaborate on this?
thank you,
Last edited by kfor; 03-16-2008 at 07:13 PM.
-
if you create a sound object with nothing inside the Sound() function parenthesis, then the sound object will control volume of all sounds.
instead you create a sound object and pass the target path of a unique movie clip to the Sound() function.
// create a movie clip
var snd1mc:MovieClip = this.createEmptyMovieClip("snd1mc",this.getNextHig hestDepth());
var Sound1:Sound = new Sound(snd1mc); // pass it to the sound function
-
thank you, finally got it to work,
-
Flash Genie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|