Home / Articles / Adobe Creative Suite / Extending AJAX with the Flash/JavaScript Integration Kit

Extending AJAX with the Flash/JavaScript Integration Kit

Article Description

Want more control over the user experience? Because Flash makes graphical programming quick, easy, and attractive, and because JavaScript is very effective at manipulating HTML, they can be leveraged to focus on their strengths. Kris Hadlock shows you how to extend AJAX (Asynchronous JavaScript and XML) by cross-communicating between Flash and JavaScript. Discover how this technique enables technologies to focus on specialized tasks, and helps create the ultimate user experience.

Like this article? We recommend

Macromedia Flash MX 2004: Training from the Source

Macromedia Flash MX 2004: Training from the Source

$44.99

Flash

Now open Flash and import the two JavaScript classes from the Integration Kit.

import com.macromedia.javascript.JavaScriptProxy;
import com.macromedia.javascript.JavaScriptSerializer;

Instantiate the JavaScriptProxy object and pass it two parameters. The first parameter is the local connection id that we already set in flashvars, and the second is the scope of your Flash file.

var proxy:JavaScriptProxy = new JavaScriptProxy(_root.lcId, this);

At this point, you have the foundation code that you need to move forward with Flash.

4. JavaScript to Flash | Next Section Previous Section