Guy Watson's session went on a bit longer than planned and I only got to Mike's session 10 or so minutes in. The Flash JavaScript integration kit is a really cool tool for calling ActionScript functions from JavaScript and JavaScript functions from ActionScript, is completely open source and hosted on osflash.org. In Flash 8 we of course have ExternalInterface which can do synchronous calls and get return values but if you need compatibility with players lower than 8 this is definitely the way to go. Setting it up is relatively easy, and there's a tutorial on how to do it in the osflash wiki.

http://www.osflash.org/flashjs/docs/installation

Some things that came up in the session and are worth mentioning:

- to get around the maximum size of objects you send between JavaScript and Flash you need to split it into chunks (this is also on the todo list to possibly automate this in future releases of the kit) - for Flash to JavaScript calls you don't necessarily need all code in place in the HTML, using one function that evals an argument you send it you can dynamically write Javascript code to the page (cool idea!).

Posted
AuthorPeter
CategoriesEvents, Flash