-
Mute Unmute Audio file on frame
Ive inserted an audio file into my frame:
var soundReq:URLRequest = new URLRequest("Sound_1.mp3");
var sound:Sound = new Sound();
sound.load(soundReq);
sound.addEventListener(Event.COMPLETE, onComplete);
//end of sound section
function onComplete(event:Event):void
{
sound.play();
}
I would like to know how would i mute and unmute this ....?
Im new to all this so please take it easy, any much would be much appreciated.
Regards
Enam
-
Dignitary
Your close, you just need to add a sound channel:
var channel1:SoundChannel = new SoundChannel();
var volumeAdjust:SoundTransform = new SoundTransform();
volumeAdjust.volume = .5;
channel1 = sound.play();
channel1.soundTransform = volumeAdjust;
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
|