7

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

  • Play and Pause stream
  • Change Stream

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.

2
  • Have you succeeded? What player are you using? Please update if you can. Commented Aug 23, 2010 at 10:32
  • No, we ended up pursuing a different approach. Commented Aug 23, 2010 at 19:35

2 Answers 2

8

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

Sign up to request clarification or add additional context in comments.

1 Comment

Beware that Flash player 10 really hampers the ability of Javascript to control a movie directly via Javascript / ExternalInterface. It's a new "security enhancement". It can be done, but make sure you test on Flash 10 if you try.
1

"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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.