Differentiating Between Flash Player and the Flex Framework

One of the most important concepts to understand about Flex is the relationship between the Flex framework and Flash Player. Flash Player is a runtime environment for Flash and Flex applications. It can run .swf files, which contain bytecode that can communicate with Flash Player, instructing it to perform operations such as loading images, drawing graphics, making HTTP requests, and so on. Flash and Flex applications can do only what Flash Player allows them to do. Flash Player provides an API for all the operations it can perform.

Flex applications run in the same Flash Player as Flash applications. That means the .swf files for Flex applications cannot contain anything that a standard Flash application can’t contain, and therefore, both applications have the same behaviors. This is because the applications contain only the instructions, and Flash Player is what runs the instructions. Therefore, what differentiates Flash and Flex applications is not the content, but how you create that content.

Flex consists of a compiler that is capable of compiling MXML and ActionScript. The entire Flex framework is written in ActionScript and MXML. It provides a layer of abstraction. The Flex framework consists of many thousands of lines of code, all of which ultimately run instructions that Flash Player can understand. This means that when you utilize the Flex framework, the compiler will include the necessary libraries in the .swf ...

Get Programming 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.