Performing an action when the video is complete
December 23rd, 2007 . by polyGeekIt’s pretty simple to perform some action when a video completes playing. You use the videoMaruCreationComplete function to set a callback - videoMaru.setOnVideoComplete( fn ) - to some function that you would like to run when your video finishes playing.
Here is a simple example that is fully commented. Hopefully you can follow this template to do what ever you need to do.
| Download Example FLA |
Here is the code that enables this. You’ll need to look inside the FLA to understand the layer structure and read the comments.
function videoMaruCreationComplete():Void {
videoMaru.setOnVideoComplete( theVideoIsOver );
}
//
function theVideoIsOver():Void {
this._parent._parent.gotoAndStop( "videoOver" );
}







hi
i hav a flv player, inside a html page,
in html page one button is there,
that button should be invisible until user click & watch half of the flv movie(suppose it reach to a particular cue point),
after reaching particular cue point,that html button should be automatically active,
any idea how to do this type of thing using javascript in flash,plz provide the code for that
neeraj8585@gmail.com
Hi, excellent video implementation!
Bit of an issue with the setOnVideoComplete with some FLVs that are compliled using premier, it just refuses to work, could you spread any light on this?
Ta
@Mark, I’m pretty sure it has to do with the metaData that’s received - which doesn’t seem to be correct when exporting with Premier. I’m working on a solution in the next version that will work without the metaData.