Chapter 11. Working with Media

A picture is worth ten thousand words, and with Flex you have the ability to add pictures as well as animation, audio, and video to your applications. Flash Player has 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 that 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.

Overview

You can incorporate media into an application in one of 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 from the application that must be loaded into the Flex application when they are requested.

Note

One other method of loading media is called streaming. We'll discuss streaming in 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, ...

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.