Highlighted

music not stopping on video when back button is pressed

Community Beginner ,
Apr 02, 2019

Copy link to clipboard

Copied

Hi I have a video on a scene

The video is on its own scene. The video is of file format .mp4 file format. When I import the video to flash a dialogue box loads Select Video

Where is your video file?

On your computer.

I select radio button load external video with playback components.

The video has sound on it. On this scene I have added a back button that takes the user to a navigation scene. When the user clicks on the back button the music continues to play. How can I get the video to stop playing when I press the back button.

I am using actions script 3 code. This is the code for the button.

stop();

import flash.events.MouseEvent;

 

bkbtn.addEventListener(MouseEvent.CLICK, backbtnEvent);

function backbtnEvent(evt:MouseEvent):void

{

            gotoAndPlay(1,"Navigation");

}

Capture.png

TOPICS
ActionScript

Views

472

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

music not stopping on video when back button is pressed

Community Beginner ,
Apr 02, 2019

Copy link to clipboard

Copied

Hi I have a video on a scene

The video is on its own scene. The video is of file format .mp4 file format. When I import the video to flash a dialogue box loads Select Video

Where is your video file?

On your computer.

I select radio button load external video with playback components.

The video has sound on it. On this scene I have added a back button that takes the user to a navigation scene. When the user clicks on the back button the music continues to play. How can I get the video to stop playing when I press the back button.

I am using actions script 3 code. This is the code for the button.

stop();

import flash.events.MouseEvent;

 

bkbtn.addEventListener(MouseEvent.CLICK, backbtnEvent);

function backbtnEvent(evt:MouseEvent):void

{

            gotoAndPlay(1,"Navigation");

}

Capture.png

TOPICS
ActionScript

Views

473

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
Apr 02, 2019 0
Adobe Community Professional ,
Apr 02, 2019

Copy link to clipboard

Copied

stop your flvplayback when navigating away from the frame that contains your video.

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...
Apr 02, 2019 1
Community Beginner ,
Apr 03, 2019

Copy link to clipboard

Copied

Hi thank this works. If you press the stop or pause button on the flvplayback then press the back button the music stops playing in the background. Just wondering, is there code for flvplayback to stop the video it if the uuser has forgotten to press the stop button on the video player?

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...
Apr 03, 2019 0
Adobe Community Professional ,
Apr 03, 2019

Copy link to clipboard

Copied

yes, that's why i meant in message 1.

assign your flvplayback instance a name (eg, flv_pb) and apply stop() to it:

function backbtnEvent(evt:MouseEvent):void

{

flv_pb.stop();

            gotoAndPlay(1,"Navigation");

}

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...
Apr 03, 2019 2
Community Beginner ,
Apr 05, 2019

Copy link to clipboard

Copied

Excellent.

Loving the work

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...
Apr 05, 2019 0
kglad LATEST
Adobe Community Professional ,
Apr 05, 2019

Copy link to clipboard

Copied

great!

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...
Apr 05, 2019 0