Chapter 3. Building a Basic Flex Application
In this chapter, I describe how to create and deploy a basic "Hello World" Flex application.
The code samples and screen shots in this chapter assume that you're using Flex Builder to build the application. If you're using the Flex SDK and your own text editor, the steps will be similar, but you won't have access to some of the code completion and other productivity tools I describe.
After the application is built, I describe the fundamental nature of a Flex application, including the relationship between the application .swf
file and the supporting HTML files. I describe the contents of the HTML "wrapper" file that's generated for you in Flex Builder and its associated JavaScript library file.
Finally, I describe how to deploy the Flex application into a Web site in these ways:
As a distinct application that opens in its own window
As an applet that's displayed as part of an existing Web page
As a desktop application deployed on the Adobe Integrated Runtime
By the end of this chapter, you should have a good sense of what a Flex application is and how it's delivered to the user.
Creating a "Hello World" Application
In all programming languages, your first task is to write a "Hello World" application. This most simple of applications typically contains no more than a single line of text output. This simple Flex application does a bit more: It uses XML-formatted data, presented in a DataGrid
component, to say hello to the world.
Throughout these ...
Get Adobe® Flex® 3 Bible now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.