views:

50

answers:

1

Is it possible to use JavaScript to "stop" and "play" video that's inside an FLV player?

I want to do this using only JavaScript and without modifying the FLV player or movies.

The FLV player I must use is one of the default players bundled with Flash (FLVPlayer_Progressive).

A: 

You can use ExternalInterface to communicate between Flash and its host object, in this case JavaScript running within the host browser.

http://kb2.adobe.com/cps/156/tn_15683.html

EDIT: The link to the code download is dead on the previous link. Use this one for the code: http://www.adobe.com/devnet/flash/articles/external_interface.html

You will want to mimic the ExternalInterface_addCallback example.

jdmichal
Hrm. I think I might have misread the question. Do you mean you do not want to modify the Flash SWF file at all?
jdmichal
Right, I do not want to modify the Flash SWF file at all.
@ed that may be going to be difficult.
Pekka
In that case, completely ignore this answer! I can't find anything online to help with this.
jdmichal