• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Stop sound upon frame exit

New Here ,
May 21, 2014 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

TOPICS
Development

Views

240

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
community guidelines

correct answers 1 Correct answer

LEGEND , May 26, 2014 May 26, 2014

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.

Votes

Translate

Translate
New Here ,
May 26, 2014 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 ...

Votes

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
community guidelines
LEGEND ,
May 26, 2014 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.

Votes

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
community guidelines
New Here ,
May 27, 2014 May 27, 2014

Copy link to clipboard

Copied

LATEST

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

Votes

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
community guidelines