Skip to main content
Known Participant
March 21, 2007
Question

mute stream playback

  • March 21, 2007
  • 1 reply
  • 266 views
Hi guys,
I just cant figure out why this wont mute.

quote:


var connection_nc:NetConnection = new NetConnection();
connection_nc.connect(null);
var stream_ns:NetStream = new NetStream(connection_nc);
viewer.attachVideo(stream_ns);
streameMuted = false;
stream_ns.play("media/mentorMedia/classes/" + _parent.classID + "/intro.flv");
butMute.onRelease = function() {
if (!streamMuted) {
stream_ns.receiveAudio(false);
streamMuted = true;
} else {
stream_ns.receiveAudio(true);
streamMuted = false;
}
};


Ideas?
    This topic is closed to new replies. Start a new post to keep the conversation going.

    1 reply

    March 21, 2007
    djdomain,
    I believe it is due to the NetStream playing locally, not streamed from FMS. Looking at the NetStream class for local connections, there is no method to toggle the audio.

    What I do is append the audio to a sound object, then control the sound via the Sound object.

    HTH,
    Shack