» Are you looking for FLV Player?

flash.external.ExternalInterface example

16 September 2005 | filed under flash | 3 comments

An exciting new feature introduced with the Flash 8 Player is ExternalInterface. This feature allows you to communicate seamlessly between Flash and its container, usually the browser. I put together a simple example to demonstrate how ExternalInterface works.

Basically, ExternalInterface.call enables Flash to call a function in Javascript, while Javascript can just as easily access functions within your Flash movie.

No more getURL("javascript:.."), fscommand or setVariable hassle!

I can hear some of you think: “Can’t be that easy, bet it won’t work with Firefox or Safari.”. Well, it really is that easy. All major browsers support ExternalInterface. IE uses ActiveX technology to support it; Firefox and Safari (1.3+) rely on the NP Runtime API.

Enough text, here’s a simple demo:

Flash Player 8 or better required. You can bypass the detection if you wish.
Enter text in the HTML form below to send data to Flash:

> received from Flash.

Download the source files (both Actionscript and HTML/Javascript file are included) to see how this demo works.

 

3 Responses to “flash.external.ExternalInterface example”

  1. Abel says:

    Thank you! Always some nice links out there :)

  2. Kunthar says:

    Combining with ajax this sample gonna be cool. Thanks man.

  3. Rizky says:

    err…. is it only me who received “FlashObject is not defined” ?

Leave a Reply