Groups | Blog | Home
all groups > flash data integration > april 2006 >

flash data integration : Calling a javascript function from flash


sixstringdev
4/13/2006 1:04:14 PM
Is it possible to call script functions from a flash object that the flash
object will only be able to access once it is placed on an html page?

I'm pretty new to flash, and I'm basically wanting to be able to build a flash
object that can inter-act with javascript functions that will be accessible
when a page loads that contains the flash object.

Any ideas?
Pointy the Rascal
4/13/2006 1:27:51 PM
a quickie:

SCORM_and_Flash
4/13/2006 9:26:50 PM
There are several ways to call javaScript on an HTML page from flash.
FSCommand
getURL
ExternalInterface

Here is an example of calling a JavaScript function from Flash with getURL:

getURL("javascript:alert('hello world!');");



Here is an example of calling a JavaScript function from Flash with the
ExternalInterface class:

flash.external.ExternalInterface.call("alert", "hello world!")
AddThis Social Bookmark Button