Flash / JavaScript Integration Kit (with Open License)

Well, as many noticed last week from the Flash Platform whitepaper, we have released a beta of the Flash / JavaScript Integration kit. The kit allows you to call functions from Flash to JavaScript and JavaScript to Flash, all while working cross browser, and supporting passing complex data types.

Here is a list of the data types that the kit supports:

  • Object
  • Array
  • String
  • Number
  • Boolean
  • Date
  • null
  • undefined

Here is a simple code example that show a call to a JavaScript function from within Flash:[code]import com.macromedia.javascript.JavaScriptProxy;var proxy:JavaScriptProxy = new JavaScriptProxy();proxy.call(“javaScriptMethodName”, “arg1”, new Object());[/code]We are starting to use the kit at MXNA, and you can view an example here (right click the chart to view the source).You can find the latest info on the kit, as well as download the most current release from here.The kit has been live since last week, but we haven’t posted about it until now because we wanted to finalize the details on the licensing. Well, we finally worked out all of the details, and I am really excited to announce that the project is being licensed under an open license (based on the Apache 1.1 Software license). You can view a copy of the license here.Since the project is now an open project, we have moved it from our internal servers over to osflash.org.Here are the main links:

The main project site is hosted on the osflash wiki, so anyone can add to the docs, samples, etc…Anyways, expect a lot more info in the coming days and weeks. We have been getting some bug submissions, and are planning on doing a new release soon.Also, I want to give a big thanks to Aral Balkan, for setting up osflash, but also helping us work out all of the details and helping make the project being open source possible.

11 Responses to Flash / JavaScript Integration Kit (with Open License)

  1. chris says:

    Sounds pretty cool!Will this also work on MAC?Now and in the future (Intel)?Hopefully.Keep up the good work Mike.regards

  2. Mike Chambers says:

    >Will this also work on MAC?Yes. It works on Firefox, Safari and Opera on Mac.mike chambersmesh@macromedia.com

  3. PaulC says:

    Oh happy day! Now to re-write my SCORM API to Flash communication!

  4. Greg says:

    This is great stuff! Can’t wait to get my hands into it. A quick question, this differs from Flash Methods because you can call custom functions and send various data types?Cheers!

  5. Jack says:

    Very cool. When will it leave beta?

  6. James says:

    Will this work cross-domain (swf coming from one domain and the the js files that communicate with the swf coming from another domain)? If not, is there a work-around without having to use policy files/shims?

  7. bobo says:

    i get 403 html error massage.please,fix it

  8. mike chambers says:

    >i get 403 html error massage.I posted about 10 links in the post, which one is giving you a 403.mike chambersmesh@macromedia.com

  9. Jameson Hsu says:

    Mike,We’ve just added the Flash / JavaScript Integration Kit to the MochiBot.com Dashboard. You can see it in action by going to http://mochibot.com and logging in under the demo account. Use the “Demo” link at the top of the page to get in.

  10. Mike says:

    Mike,Are there any known issues/updates with Firefox 2.0… it seems that code that I have written no longer works within 2.0 when it worked in the previous version. Here is our development link to illustrate the issue (works in i.e. 6.0 but not in Firefox 2.0)Clicking the arrows or nav items should switch out content: http://soft-litedev.liggett.com/windows/elements/DoubleHung.asp?features

  11. Matt says:

    Hey Mike,I am enjoying your integration kit, however I am having trouble getting JS talking back to Flash in Firefox 2 on Windows. Do you know of any solutions?Here’s an example: http://www.royallmedia.com/royallmedia/stage/