Highlighted

Stop sound upon frame exit

New Here ,
May 21, 2014

Copy link to clipboard

Copied

Good day all,

I am working on a mobile app for video streaming. I have video loading on a frame, upon exit to different frame, sound keeps playing. Looks like SoundMixer.stopAll(); is not working.

Regards

Adobe Community Professional
Correct answer by Colin Holgate | Adobe Community Professional

The audio in a net stream is not a regular Sound object, and so you can’t stop the sound using the sound mixer. You should be able to stop the stream like this:

ns.stop();

where ns would be your NetStream variable.

TOPICS
Development

Views

163

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Stop sound upon frame exit

New Here ,
May 21, 2014

Copy link to clipboard

Copied

Good day all,

I am working on a mobile app for video streaming. I have video loading on a frame, upon exit to different frame, sound keeps playing. Looks like SoundMixer.stopAll(); is not working.

Regards

Adobe Community Professional
Correct answer by Colin Holgate | Adobe Community Professional

The audio in a net stream is not a regular Sound object, and so you can’t stop the sound using the sound mixer. You should be able to stop the stream like this:

ns.stop();

where ns would be your NetStream variable.

TOPICS
Development

Views

164

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 21, 2014 0
New Here ,
May 26, 2014

Copy link to clipboard

Copied

Really? No one else has video and sound persisting after navigating away from the frame housing the media asset? Onwards to Titanium ...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 26, 2014 0
Adobe Community Professional ,
May 26, 2014

Copy link to clipboard

Copied

The audio in a net stream is not a regular Sound object, and so you can’t stop the sound using the sound mixer. You should be able to stop the stream like this:

ns.stop();

where ns would be your NetStream variable.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 26, 2014 0
New Here ,
May 27, 2014

Copy link to clipboard

Copied

Thank you Colin. I reconfigured to stop video playback altogether upon frame exit, because the sound would stop with your code snippet, but I suspect the video would still be streaming. Users would therefore incur higher 3G data costs. This worked for me.

--------------------------------------------------------------------------------------------------------------

//GoTo  Channel Guide

btn_back_HOME.addEventListener(MouseEvent.CLICK,fl_BackHOME);

function fl_BackHOME(event:MouseEvent):void

{

    tv1.addEventListener(Event.REMOVED_FROM_STAGE, stopPlay);

    function stopPlay(e:Event)

{

      tv1.stop();

}

    gotoAndStop("home");

}

--------------------------------------------------------------------------------------------------------------

Kind regards

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 27, 2014 0