views:

212

answers:

2

I need to capture the event raised when a flash video ends. If possible, I'd like to distinguish this from a user clicking the stop button.

One thing to be made perfectly clear:

I DON'T HAVE CONTROL OVER THE PRESENTATIONS OR THE SWF FILES.

What I'm looking for is simple (I thought) js automation of the client player object, not more complex interactivity with the presentation itself. I thought this would be really simple stuff, but a dozen Google and Bing searches later, I can't find anything about it.

TIA.

+1  A: 

No can do. The SWF doesn't make anything available to the JavaScript layer unless it's specifically programmed to do so. Without access to the source, you're out of luck.

Cory Petosky
+1  A: 

The only way I know to do this is via an ExternalInterface call from the swf.

If you DID have access to the fla, then the following would work

// Flash

import flash.external.ExternalInterface;
ExternalInterace.call('yourJavascriptFunction', 'other', 'paramaters', 'to', 'pass');

// Javascript

function yourJavascriptFunction(param1, param2, param3, param4) {
    doSomethingWith(param1, param2, param3, param4);
}
sberry2A
FLA? Who still builds stuff with code using an FLA? :)
Cory Petosky