O'Reilly logo

Flex on Rails: Building Rich Internet Applications with Adobe Flex 3 and Rails 2 by Daniel Wanja, Tony Hillerson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

21 Communicating between Flex and JavaScript

Goal

You’d like to integrate Flex with an existing JavaScript-powered HTML application.

Solution

Use either Flex’s ExternalInterface or the Flex-Ajax Bridge to enable two-way communication between Flex and JavaScript.

Communication between Flex and JavaScript

What does it mean that we can communicate between Flex and JavaScript? Pretty much anything you’d like to tell Flex to do from JavaScript, and vice versa. The communication can either be in terms of calling methods with ExternalInterface or setting properties in Flex via the Flex-Ajax bridge.

Even though we haven’t mentioned it much so far, since it’s not something that requires extra work to accomplish, Flex works great ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required