Mike Chambers

code = joy

Flash / JavaScript Integration Kit (with Open License)

with 11 comments

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:

import com.macromedia.javascript.JavaScriptProxy;

var proxy:JavaScriptProxy = new JavaScriptProxy();
proxy.call("javaScriptMethodName", "arg1", new Object());

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.

Written by mikechambers

June 14th, 2005 at 12:24 pm

Posted in General

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

Subscribe to comments with RSS

  1. Sounds pretty cool!

    Will this also work on MAC?
    Now and in the future (Intel)?

    Hopefully.
    Keep up the good work Mike.
    regards

    chris

    14 Jun 05 at 1:07 pm

  2. >Will this also work on MAC?

    Yes. It works on Firefox, Safari and Opera on Mac.

    mike chambers

    mesh@macromedia.com

    Mike Chambers

    14 Jun 05 at 1:13 pm

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

    PaulC

    14 Jun 05 at 1:17 pm

  4. 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!

    Greg

    14 Jun 05 at 1:53 pm

  5. Very cool. When will it leave beta?

    Jack

    15 Jun 05 at 12:00 pm

  6. 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?

    James

    21 Jun 05 at 12:26 pm

  7. i get 403 html error massage.
    please,fix it

    bobo

    22 Jun 05 at 6:01 pm

  8. >i get 403 html error massage.

    I posted about 10 links in the post, which one is giving you a 403.

    mike chambers

    mesh@macromedia.com

    mike chambers

    22 Jun 05 at 6:37 pm

  9. 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.

    Jameson Hsu

    8 Aug 05 at 8:23 pm

  10. 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

    Mike

    14 Nov 06 at 2:42 pm

  11. 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/

    Matt

    6 Feb 07 at 1:41 pm

Leave a Reply