Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > Adobe Flash

Extending AJAX with the Flash/JavaScript Integration Kit

  • Print
  • + Share This
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

One of the benefits of using different technologies in a project is the ability of leveraging them to focus on specific tasks. Developers then have the ability to develop robust applications that provide content in the most effective form.

In this article, you'll learn 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 see how it helps to create the ultimate user experience. Because Flash makes graphical programming quick, easy, and attractive, and because JavaScript is very effective at manipulating HTML, we can leverage these technologies to focus on their strengths. This will provide us with more control over the page and, ultimately, the user experience.

I'm assuming that you have a basic understanding of ActionScript 2 and AJAX. I'm sure you already have an idea of what you plan to build with this knowledge. If not, this article will spark plenty of ideas. For example, you can easily create a graphical representation of an RSS feed, blog, or any other XML data that you can get your hands on.

If that doesn't inspire you, I created a sample project that can be viewed here. The code for the sample can be downloaded here. The sample uses AJAX to parse an XML file, which displays the data as HTML. The part that you will learn is how to extend the functionality with the Flash JavaScript Integration Kit, which creates a connection between the HTML and a Flash bar chart. The end result is a list of mortgage companies with specific loan statistics and a bar chart that represents their percentage rates. The benefit of using this combination of technologies is providing the information to the user in the most intuitive and responsive form possible.

JavaScript Flash Integration Kit

If you don't already have the Flash /JavaScript Integration Kit, you can download it from this site. Or, if you have Subversion, you can get the latest source code from here. If you have concerns about compatibility, the Integration Kit has been successfully tested on the following browsers:

  • Windows IE 6.0
  • Windows Firefox 1.0
  • Windows Opera 8.0
  • Macintosh Opera 8.0
  • Macintosh Firefox 1.0
  • Safari 1.2.4 and 2.0
  • Linux Firefox 1.0.4
  • + Share This
  • 🔖 Save To Your Account