|
-
 Originally Posted by rynoe
There are many different ways to skin a cat here is an example of a slightly more bloodier version:
Code:
var mySound:Sound = new MySound();
var mySoundCHNL:SoundChannel = new SoundChannel();
mySound= mySound.play(0,1000);
var mySoundVolume:SoundTransform = mySoundCHNL.soundTransform;
mySoundVolume.volume = 0;
volume can be set from 0 to 1.
MySound is a sound file in the library as a class linkage
This is also another option, but the only issue is that the sound would still be "playing", just you can't hear it. This could be useful in some instances (where you can to have the sound continue playing as it will only be off for a while, like during a menu), but if you want to be optimal, it's probably best practice to stop the sound completely rather than mute it. All depends on the situation, really, but good job pointing this out, I forgot about it and it could help out a few others.
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
|