Copy link to clipboard
Copied
Hello and thanks for any help in advance. I am attempting to create a simple presentation in animate that plays external videos from a button interface. I have imported the videos to 6 separate frames in the scene, frames 10, 20, 30, 40, 50, 60. The interface is on frame 1 containing 6 buttons. Code frame 1 -
The buttons work, play head jumps to requested frame video plays on stage. The viewer navigates back with a back button. Code -
BackButton.addEventListener(MouseEvent.CLICK, f7_ClickToGoToAndStopAtFrame);
function f7_ClickToGoToAndStopAtFrame(event:MouseEvent):void
{
gotoAndStop(1);
}
The problem is the videos do not unload and continue to play in the background. I know I am forgetting some code or maybe the way I have designed this won't be possible but I was trying the simplest solution. I have not worked in animate in years, any help would be GREATLY appreciated!
Thank you!
This code works
Copy link to clipboard
Copied
are the videos loaded into an flvplayback component? embedded in a timeline?
Copy link to clipboard
Copied
Thanks for the response, I actually found an old project I did years ago and used the same code. It seems to work without issue in the swf but when launched from an exe it has issues for some reason. Still doing some testing but is their any known issues with the new way these are exported to exe?
This is the code I am using. I broke the project into scenes.
Copy link to clipboard
Copied
Actually that is my main Nav code, Scene code below
Copy link to clipboard
Copied
can you answer my question?
Copy link to clipboard
Copied
File - Import Video - Load external video with playback component - Browse to video - skin set to none - finish
Then - the instance name VideoCause
Thanks
Copy link to clipboard
Copied
apply the stop() method in your listener function with gotoAndStop(1). ie, this
VideoCause.stop();
would work if you did this correctly. because it's not working, you probably have many different instances of your video component (and if they're in different scenes, it's guaranteed you have different instances). the best solution would be to eliminate scenes and just use keyframes and labels.
an alternative is to assign each flvplayback nstance a different instance name, and apply the stop() method to the relevant instance.
Copy link to clipboard
Copied
I didnt change the code - exported using AIR Package installed to my test station and it is working great.
Do you use this code to launch stage 100%? I add this action script to first frame.
stage.displayState = StageDisplayState.FULL_SCREEN;
Any updated way that works better?
Thank you for your help
Copy link to clipboard
Copied
The stage code above doesn't work, it launches full screen but then causes the presentation to not function properly. Any idea how too launch full screen without the title bar at top?
Copy link to clipboard
Copied
is the video issue solved?
Copy link to clipboard
Copied
Its working but it didn't work with the suggested -
" apply the stop() method in your listener function with gotoAndStop(1). ie, this
VideoCause.stop();"
It would not even publish. Thank you though, help is greatly appreciated.
Copy link to clipboard
Copied
i explained why that won't work with the way you set up your fla.
what did you do to solve the problem?
Copy link to clipboard
Copied
This code works
Copy link to clipboard
Copied
you're welcome.