Michael Barker
Michael Barker

Reputation: 14378

Controlling a Flash Player using JavaScript

I would like to be able to control a flash movie stream using JavaScript in the same pages as the flash component including:

I can already load the player and set the flash args, but I don't know how to interact with the player once the stream has started. Is this possible without modifying the SWF that is currently used to play the movie?

Mike.

Upvotes: 7

Views: 11300

Answers (2)

Scott Evernden
Scott Evernden

Reputation: 39926

"Is this possible without modifying the SWF that is currently used to play the movie" .. it's only possible if the SWF you are using implements the ExternalInterface with documented functions suitable to your needs - as described by cliff.meyers ... otherwise, .... no

Upvotes: 1

cliff.meyers
cliff.meyers

Reputation: 17734

The SWF needs to expose functions to Javascript using the ExternalInterface API from the Flash libraries. This allows Javascript to call into Flash and vice-versa.

http://livedocs.adobe.com/flex/3/langref/flash/external/ExternalInterface.html

Upvotes: 8

Related Questions