Thursday, March 12, 2009

An example of communication between JavaScript and Adobe Flash Player

Today, my project needs to send information from javascript to Flash. Read on the following article:

An example of communication between JavaScript and Adobe Flash Player


http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15683

Added: 2009-03-20

The code in the above link does not work. Some modifications are needed:

function getFlashMovie(movieName) {

if(document.embeds[movieName]) return document.embeds[movieName];
if(window.document[movieName]) return window.document[movieName];
if(window[movieName]) return window[movieName];
if(document[movieName]) return document[movieName];
return null;
}

No comments: