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 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.