Communication between ActionScript 3 and JavaScript

With AS3 is extremely easy to communicate ActionScript with JavaScript:

In the AS code:

In the HTML code:

For a more detailed example check the example at Adobe.

The files download doesn’t work (no externalinterface_files.zip nor ExternalInterfaceExample.zip), so I compiled the example. You can download it.

3 Comments

  • Your download does not include the as file. While your swf/html work, I can’t recreate it.

    By Ryp Walters
    | Monday, 25 January 2010
  • You are right! sorry, stupid error, but unfortunately I can’t find the file now… anyway it’s easy, you just have to create the as file with the code in the Adobe tutorial, and create the text and elements with the specified symbol name, I should have them in my fla file unless i created them with code in the example, i can’t remember…

    | Monday, 25 January 2010
  • Your code is not working on IE

    By Dev
    | Tuesday, 16 February 2010

Leave a comment