Skip to Content
Programming Flex 3
book

Programming Flex 3

by Chafic Kazoun, Joey Lott
September 2008
Intermediate to advanced
660 pages
20h 32m
English
O'Reilly Media, Inc.
Content preview from Programming Flex 3

Adding Media

As mentioned before, you can add media to an application by either loading it or embedding it. In this section, we will discuss the different syntax for loading and embedding media. This will serve as a good foundation for understanding the methods you have available to you when adding media to a Flex application. In the Flex framework, watch for component properties that accept a variable of type Class. These properties usually indicate the ability to accept a media type as a value.

Note

If you have experience with developing Flash applications, you may be accustomed to creating classes for symbols such as images for when you want to access them in ActionScript. In Flex, this is no longer required as the compiler generates such classes for you automatically.

Loading Media

The easiest and most common way to load media at runtime is to use one of the MXML components specifically designed for that job. A variety of components are available for different types of media. You can use an Image component to load images, an SWFLoader component to load .swf files, or a VideoDisplay component to load video content. The Image component is the most commonly used of these components and the one we will focus on in this section.

Note

Internally, Flex makes use of Flash Player’s Loader class. You typically will not make use of the Loader class directly as the Flex framework abstracts away the details, but it is good to know that it exists and that if you ever need to implement the loading ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Programming Flex 2

Programming Flex 2

Chafic Kazoun, Joey Lott
Flex 3 Cookbook

Flex 3 Cookbook

Todd Anderson, Joshua Noble
Getting Started with Flex 3

Getting Started with Flex 3

Jack D. Herrington, Emily Kim
Flex 3 in Action

Flex 3 in Action

Jon Hirschi, Faisal Abid, Tariq Ahmed

Publisher Resources

ISBN: 9780596516215Errata