Flash and AJAX Integration Example

Kevin Lynch is at the O’Reilly AJAX Summit in
San Francisco today and tomorrow. He gave a presentation to the group earlier today
about integrating Flash and AJAX, and he demoed a cool new proof of concept Mike
Chambers
and I put together for him. We’ve integrated Flash and AJAX before
for the MXNA
reports
, but the new MXNA
Category Feed Report
takes it to a new level by using two-way
data exchange between Flash and JavaScript. First of all, click on the category
names, and notice how the feed names reload below without reloading the page. Pretty
standard "AJAX" stuff, really, but now click on a feed name and notice how both
the Flash chart and the posts below the chart update without the page refreshing.
When you click on a feed name, we’re using JavaScript to pass data into the Flash
movie which then updates itself using the MXNA
web services
. When you click on
a bar in the chart, we pass data from the Flash chart into JavaScript to load the
selected post at the top of the list. Overall, I think it’s a very good experience.

Ajaxian is reporting on the summit, and
wrote a
good summary
of Kevin’s presentation. There will be lot more information available
on how we did this with lots of code and documentation (along with a more generic,
reusable framework), but for now, feel free to view source and steal. You can
even right-click on the Flex chart and view its source, as well.