Extending Flex

Programming in Flex 2 is very different than programming Flash. Your job as a Flex developer is to figure out ways to best utilize the existing, comprehensive framework to accomplish your goals. Flash developers spend more time building functionality from the ground up, which allows them more freedom but less latitude for change and less speed.

Furthermore, Flex 2 performs at its best with applications. Common interfaces that you see in desktop applications, forms, and HTML pages are supported directly by often-identical structures in Flex 2. As you have seen, it can be trivial to create an application composed from common UI components.

This strength, however, doesn't belie an equal weakness. Flex 2, unlike HTML, comes to you in an open box. Every class in the library is provided with ActionScript 3.0 source, and literally hundreds of classes are non-final classes, ready to be extended and modified however you need! The framework is consistent, so that you can learn it and write your own components, effects, skins, styles, or anything else.

Flex 2 comes with a great set of functionality, and if something you'd like isn't there, you can build yourself.

Complete Flexibility

The best part of the Flex framework is that you can extend it at any point. You can extend concrete, fully usable classes like CheckBox. You can extend abstract base classes like Container. And you can write pure AS3, which only uses the Flash Player 9 API. You can write classes in MXML or ActionScript ...

Get Introduction to Flex 2 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.