A picture is worth a thousand words, and with Flex you have the ability to add pictures as well as animation, audio, and video. Flash Player started its roots in graphics and animation, and over time it has grown into a strong development runtime for interactive custom user interfaces. Flash Player has a long history in handling rich media on the Web, and Flex can leverage that strength and provide a truly engaging user experience. Flash Player not only handles many of the bitmap graphics formats traditional web browsers do, but it also has native support for vector-based graphics, animation, audio, and video.
This chapter covers loading and embedding assets, streaming media, supported media types, and working with the different media types.
In an application, media can be incorporated in two ways: at runtime or at compile time. Adding media at compile time is called embedding, because the content is compiled into the SWF. Adding media at runtime is called loading because the content exists as separate files that must be loaded into the Flex application when they are requested.
One other method of loading media is called streaming. We will discuss streaming in the section "Working with Audio and Video" later in this chapter, because streaming applies only to those media types.
There are benefits to both methods. Which one you choose is important, because each one can impact the loading time of your application, the file size of the resulting ...