Skip to Content
Flash Out of the Box
book

Flash Out of the Box

by Robert Hoekman Jr.
November 2004
Intermediate to advanced
254 pages
9h 23m
English
O'Reilly Media, Inc.
Content preview from Flash Out of the Box

Chapter 10. Loading Assets On the Fly

In this chapter we really begin to flex our Flash muscles. We’ll load external JPEGs on the fly, use ActionScript to create a preloader, optimize images in Fireworks, use built-in components, and even create our own custom component. So hang on tight!

This chapter focuses almost entirely on solving one problem: finding the best way to load external assets into a Flash movie while it’s running. This goal can be accomplished in several ways, and each approach has its merits. We’ll work with each method and learn which is best in any given situation.

“So,” you wonder, “why do I want to load assets into a Flash movie dynamically when I can just import them at authoring time?” And that is a good question, for which there are several answers.

First, as good as Flash’s built-in compression engine is, it’s not good enough in all situations. You can’t import a bitmap image weighing 100 KB into a Flash document and expect to produce a .swf file that is small enough to load quickly over a dial-up connection.

Second, Flash projects are often more complex than what we’ve created so far in this book. Web sites, photo galleries, presentations, printable advertisements, and many other things can all be created with Flash, and it is rarely an economical use of file size to cram all the necessary assets into one Flash document. Adding one bitmap image to a Flash project may not affect the file size much, but try adding 10, each of which is used in a different screen ...

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

CorelDRAW X7: The Official Guide, 11th Edition

CorelDRAW X7: The Official Guide, 11th Edition

Gary David Bouton
Internet Yellow Pages, 2007 Edition

Internet Yellow Pages, 2007 Edition

Mikal E. Belicove, Joe Kraynak
TiVo Hacks

TiVo Hacks

Raffi Krikorian

Publisher Resources

ISBN: 0596006918Errata Page