Chapter 3. Flex 101: Step by Step

This chapter will walk you step by step through the process of constructing a Flex application. That starts with learning how Flex works. Flex is an XML-based language that is compiled into Flash applications. You can see the process portrayed graphically in Figure 3-1.

The flow of Flex application building
Figure 3-1. The flow of Flex application building

Going from the bottom left of Figure 3-1 to the top right, Flex Builder 3 helps you write app.mxml, the Flex application. That in turn is run through the MXML compiler that generates a SWF file for the application. It also generates a temporary HTML test page that hosts the SWF so that you can test it. The SWF and the HTML are replaced after each compile, so I made them dashed to indicate that they are temporary.

Flex Builder is actually a bit more useful than this in that it really manages projects, which are sets of Flex applications and components, as well as assets (e.g., images and audio that are embedded in the SWF) and any libraries that your project references. This is shown in Figure 3-2.

The Flex project creating a single SWF
Figure 3-2. The Flex project creating a single SWF

Now that you have a general idea of how Flex Builder 3 creates Flex applications, it’s time to walk through the process of creating a real Flex application.

A Flickr Viewer

The final sample application ...

Get Getting Started with Flex 3 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.