Loading Images (AS3)

images

FLASH IS CAPABLE OF loading quite a few file formats at runtime, including audio (MP3), motion graphics (FLV and SWF), and images (JPG, GIF and PNG). When you load such files with ActionScript, you’re doing your visitors a favor: not only does this practise reduce the file size of the main SWF, but it also gives users the chance to decide which files they want to see. Why make them download it if they’re not interested, right? With dynamic loading, everyone wins. Let’s look at a JPG example using ActionScript 3.0.

 

images

1 The ...

Get How to Cheat in Adobe Flash CS4 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.