-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Flex 3 with Java

The External API is a subset of ActionScript 3.0 and enables communication between a Flex application and the container application within which your Flex application is running. When you build a Flex application from Flex Builder, it also generates an HTML wrapper to execute your Flex .swf
file into Flash Player instance. This HTML wrapper is known as the container application in this context.
This section gives you an overview of how the External API can be used to establish communication and exchange data between your ActionScript and JavaScript from HTML wrapper and vice versa.
An external API can be very useful in cases where you want to interact with container applications directly, or exchange data between JavaScript and ActionScript (and vice versa). A common example would be if you want to pass some data from an HTML page to your SWF file.
This chapter focuses on the following tasks:
Communicating with JavaScript from the ActionScript code
Communicating with ActionScript...
Change the font size
Change margin width
Change background colour