O'Reilly logo

Professional Adobe® Flex® 3 by Joe Berkovitz, David Hassoun, Andrew Trice, Tom Sugden, Todd Prekaski, Jun Heider, Peter Ent, Joseph Balderson

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

Chapter 38. Browser Communication in Flex

In the vast majority of cases, Adobe Flex applications are presented to the user through a web browser. This chapter explores the methods that you can use to exchange data between your Flex application and the HTML page that contains your Flex application.

The following sections will walk you through scenarios that show you how to pass data into Flex applications using flashVars, how to exchange information back and forth from Flex to your containing HTML page using JavaScript, and seamless JavaScript/Flex integration using the Flex Ajax Bridge (FABridge).

Understanding the Web Context

Most commonly, Flex applications are presented to the user as compiled SWF files that are embedded within HTML content that is delivered over the Internet. The other option is that the Flex application is accessed directly as a SWF file. The end user does not necessarily need to know this, but from the developer's perspective, you must be aware of how the application is presented. The following sections will focus on the first scenario: interactions with Flex applications that are embedded within HTML content.

Flex applications are often delivered as full-page content within web pages. In this scenario, the Flex application takes up the entire available space within the web page. The application is designed to be a standalone application, with no user interface elements coming from outside of the Flex application itself.

Another common scenario is that Flex applications ...

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