IN THIS CHAPTER
Working with packages and classes
MXML and ActionScript
Understanding events in Flex
Working with item renderers
Building a sample Flex application
In this chapter, you learn how to develop Flex applications by using Flex Builder. You learn how to set up and use classes and packages while also learning how to use a mixture of MXML and ActionScript.
The last part of the chapter takes you through the process of building a basic application to make sure that you understand the fundamentals before moving on to other chapters that involve the Flex development process.
Unless this is your first time using Flex, you've probably worked with ActionScript classes at some point. However, you may not have built your own custom classes; this is explained in the following section.
A package is a bundle of classes that function in one easy-to-use container. Packages are common in class-based development because they add another level of separation for your code. Packages allow you to share pieces of classes without also exposing that content to foreign code.
The most common way to determine a path for a package definition is to use reverse domain format. Let's say you have a class
Person located in your project. The reverse domain format takes your Web domain, and starting with the
com, you define the package path, as in the following example: