martedì, febbraio 28, 2006

Flash/JavaScript/ActionScript Stew

There's a GREAT utility developed by Christian Cantrell and Mike Chambers at Macromedia.

http://weblogs.macromedia.com/flashjavascript/

"The Flash / JavaScript Integration kit makes it possible to seamlessly communicate between Flash and JavaScript. You can call JavaScript functions from Flash, and ActionScript functions from JavaScript."

*

There is documentation that comes with the kit, but I also found a few other tutorials:

Using the Macromedia Flash / JavaScript Integration Kit courtesy of CommunityMX
and

And various tutorials on OSFlash. One of them details how to combine the kit with Flash detection:

http://osflash.org/flashjs/docs/tutorials

*

Also, just so I have it saved somewhere, I found an obscure blog detailing how to add the ID tag without modifying the JavaScript).

tag.setFlashvars('lcId='+uid);
tag.setId('flashheader); // Create ID
tag.write(document);