The Flex Ajax Bridge (FABridge) is a small code library that you can insert into an Flex application, a Flex component, or an empty SWF file to expose it to scripting in the browser.
- The ExternalInterface class also limits what you can pass across the gap - primitive types, arrays, and simple objects are legal, but user-defined classes, with associated properties and methods, are off-limits.
The FABridge library is useful in the following situations:
- You have only one or two people on your team who know Flex. The FABridge library lets everyone on your team use the work produced by one or two Flex specialists.
- You are building an integrated rich Internet application (RIA) with Flex and Ajax portions.Although you could build the integration yourself using ExternalInterface, you might find it faster to start with the FABridge.
To use the FABridge library and samples, you must have the following:
- Flex Ajax Bridge, which is included in the following directory of the Flex 3 SDK installation:
- Adobe Flex SDK
- Adobe® Flash® Player 9 or Adobe® AIR™
- Any HTTP server to run the samples
To run the samples:
- Place the src and samples folders side by side on any HTTP server.
- Open a web browser to http://yourwebserver/samples/FABridgeSample.html and samples/SimpleSample.html and follow the instructions there. Make sure you access the samples through http:// URLs and not file:// URLs. The Flash Player security sandbox prevents them from working correctly when they are accessed as local files.