|
-
I tried your example - but I wanted to mute an already exisiting mediaplayer.
The reason being I want my mute parton on a different part of screen than the media players one.
what is wrong my code here? mediaplayer is named 'mediaplayer1'
----------------
var scChannel:SoundChannel = new SoundChannel();
var stTransform:SoundTransform = new SoundTransform();
muteBtn.addEventListener
(MouseEvent.CLICK,muteButtonHandler);
function muteButtonHandler(evt:MouseEvent):void{
if (stTransform.volume > 0){
stTransform.volume = 0
}else{
stTransform.volume = 1;
}
scChannel.soundTransform = stTransform;
}
scChannel = mediaplayer1.play();
---------------
any tips?
Tags for this Thread
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
|