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");
}
Copy link to clipboard
Copied
stop your flvplayback when navigating away from the frame that contains your video.
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?
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");
}
Copy link to clipboard
Copied
Excellent.
Loving the work
Copy link to clipboard
Copied
great!