flash.external.ExternalInterface example
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:
Download the source files (both Actionscript and HTML/Javascript file are included) to see how this demo works.

August 14th, 2007 at 0:26
Thank you! Always some nice links out there
September 22nd, 2007 at 20:44
Combining with ajax this sample gonna be cool. Thanks man.
June 15th, 2008 at 3:27
err…. is it only me who received “FlashObject is not defined” ?