Log in

View Full Version : Flash Video - ending should call an event



me_myself
04-08-2010, 03:28 PM
I have a webpage which displays a FLV (flash video) file, i need to fire an event (go to another screen) once the FLV ends. How do i do this? I cannot write anything within the FLV file because the FLV files get created on-the-fly from uploaded AVI files. I need to get this done only by using a javascript or something else.

Please Help.

Thanks.

BLiZZaRD
04-08-2010, 09:29 PM
Depends on your exact needs. by "go to another screen" do you mean a new web page, or just show new content within the same page. Are you using a player and want new stuff to show in the player, are you using frames... and on and on and on...

Specifics ;)

me_myself
04-08-2010, 09:38 PM
Thanks. I need to show a new page which has dynamic content. It is for a show and the monitor would just display it - there will be no user interation. The flow would be like this -

FLV (Advertisement) > asp page which shows the seat availability (1minute) > FLV > asp page with refreshed content > FLV > .... so on

How do i figure out when the FLV ends and how to fire an event (display the dynamic page) ???

Thanks again.

BLiZZaRD
04-08-2010, 09:50 PM
Okay, a little clearer now.

Unless you are importing them into Flash yourself there really isn't a way to know when the end is reached. If you were IN Flash you could test for when the buffer was empty and move on from there, but as you said you weren't...

My advice is to figure out how long the FLV will be. if it is the same length each time you can set up a meta refresh to the new dynamic page, which also has a meta refresh back to the movie, etc... This would be easiest, if not crude.

If you are able to just use Flash and import the dynamic pages as well as the FLVs then you can use things like



import mx.video.*;
var listenerObject:Object = new Object();
listenerObject.complete = function():Void {
_root.gotoAndPlay("frame3");
trace(this);
};
my_FLVPlybk.addEventListener("complete", listenerObject);


to see when the movie has ended.