The Flash/JavaScript Integration Kit
Posted on June 9th, 2005
Yesterday I came across Macromedia's Flash/ JavaScript Integration Kit, which claims it can do something I'd very much like to do:
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.
But there's trouble on the high seas. I downloaded the kit; check. I read the readme; check. I installed the Javascript files in the webroot for my project; check. I installed the Flash part of the kit into my Flash MX 2004 classpath as instructed; check.
I created a new FLA and added the following actions to load and instantiate the proxy class:
import com.macromedia.javascript.JavaScriptProxy; var proxy:JavaScriptProxy = new JavaScriptProxy();
This seemed like a good time to compile and see whether everything was peachy, but sadly it was not. Up sprouts the Output window with the following:
**Error** C:\Documents and Settings\blovett\Local Settings\Application Data\Macromedia\Flash MX 2004\en\Configuration\Classes\com\macromedia\ javascript\JavaScriptProxy.as: Line 65: There is no property with the name 'controller'. receiving_lc.controller = this; **Error** C:\Documents and Settings\blovett\Local Settings\Application Data\Macromedia\Flash MX 2004\en\Configuration\Classes\com\macromedia\javascript\JavaScriptProxy.as: Line 67: There is no property with the name 'callFlash'. receiving_lc.callFlash = callFlash; Total ActionScript Errors: 2 Reported Errors: 2
So the proxy class seems to be getting found well enough, but what's all that business about "controller"? Have I missed something?