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:

  • 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.

Answers


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


Need Your Help

Unit Testing in Lightswitch

silverlight unit-testing visual-studio-lightswitch

I'm thinking of running unit tests for the business logic in the Lightswitch application. I've added a Silverlight unit test project (from the Silverlight Toolkit), however I couldn't retrieve the ...

DynamoDB update with ADD action on a numeric attribuite

java amazon-web-services amazon-dynamodb

So I have this table where rows have one of the two set of attributes. A row starts it's life with one set, then goes into second set (and stays that way until removed). Both sets have one attribut...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.