Jump to content
Search Community

event playProgress playComplete?

ianlens test
Moderator Tag

Recommended Posts

Hi I'm writing this on a bouncy bus on the way to the client, so I lo be brief.

 

Can anyone sketch the code to add an event listener to capture the video playProgress variable? I want to watch the completion of the play event to trigger a referenced function. Thanks I'm really looking forward to your reply.

 

I've been pouring over the docs and only have come up with some really dirty code.

Its not really a loader issue. I guess i could get the flash video classes to handle it but im sure Jack would have written a hook into the event!

 

Cheers AND thanks in advance - Ian

Link to comment
Share on other sites

Can anyone sketch the code to add an event listener to capture the video playProgress variable? I want to watch the completion of the play event to trigger a referenced function. Thanks I'm really looking forward to your reply.

 

I'm a little fuzzy on what you're asking here specifically - are you wanting to listen for when the Video completes playing (reaches the end of the video as it's playing)? If so, it'd be like:

 

var loader:VideoLoader = new VideoLoader("myVideo.flv", {autoPlay:true});
loader.addEventListener(VideoLoader.VIDEO_COMPLETE, videoCompleteHandler);
function videoCompleteHandler(event:LoaderEvent):void {
   trace("video finished: " + event.target);
}
loader.load();

 

Does that answer your question?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...