VideoEvent Does Not Work with Video Class

Hi,

I feel I have researched the WHOLE of the internet about this issue. Basically what I am trying to do is use the VideoEvent’s “COMPLETE” to detect when my FLV has reached the end.

Now the issue is, I can get this working no problem when I use the FLV Component but I have been building my own FLV Player using the Video Class, NetStreams etc.

What I’ve now found and wanted to confirm is if the VideoEvent is able to be used with the Video Class when an instance of that class has been created.

Eg: I import the VideoEvents Classpath, create an instance of the video class, attach a netstream etc etc and the video playsback fine / pausable controllable etc etc. When I set the VideoEvent.COMPLETE and attach an event handler it does not fire at the end of the FLV…
I then replace the instance of the video class with a reference to a FLV Component I just added to the stage and it works…

Is this something overlooked by Adobe? Only having some functionality when not using the FLV Component seems silly.

Any other solutions to detect the end of the FLV? I was thinking of using the onStatus event’s “Flush” code and testing to see if the duration is equal to the current time.

Cheers,
Ryan

No, there is no event.COMPLETE for the netstream class. You can however hook into the netstream status events, and listen for the “NetStream.Play.Stop” status event, then you can dispatch your own complete event, or run code based on receiving that stop status

Sweet cheers man, this is what I’ll do :smiley: