sound help

Subscribe to sound help 3 posts

avatar for yrudoy yrudoy 341 posts
Flag Post

Is there any good, easy way (one or two lines) to make one sound play louder wihtout affecting all the other sounds? I am using the behaviors, and .volume = but instead of changing it for only one sound, it does it for ALL the sounds.

 
avatar for Moonkey Moonkey 1007 posts
Flag Post

There’s a bug/feature in as2 where all sounds in the same movieclip will play at the same volume. To get around it, make a movieclip for each sound.

This is the code I used in one game. “MenuMusic” was the linkage name of the sound in the library.

var musicHolder = this.createEmptyMovieClip(“musicHolder”, this.getNextHighestDepth());
var music:Sound = new Sound(musicHolder);
music.attachSound(“MenuMusic”);
music.setVolume(musicVolume);
music.start();

 
avatar for yrudoy yrudoy 341 posts
Flag Post

So if I make a movieclip. attach a sound to it, and make it play louder, it won’t effect the behavior sounds? Or do I have to make a seperate clip for all of them? ):