Chapter 19. Using ActionScript for Media

In the preceding chapter you learned how Flash displays and manipulates text. Now you examine something that's a bit more visually stimulating for your viewers. Flash is, after all, a multimedia platform. With ActionScript, you have unprecedented control of media and media integration.

Media can include images, video, sound, and input such as cameras and microphones. You can, of course, integrate these pieces on the stage, on a timeline, and with the Flash drawing tools. However, ActionScript provides you with a robust set of objects, methods, and events for displaying and handling media for a rich media user experience.

In this chapter, you explore loading images, sound, and the microphone, and learn to use them efficiently.

Managing Images

Images are everywhere on the web. They come in all sizes and formats you can think of. You have long been able to load many image types into HTML pages. Since the introduction of JPG loading in Flash 6, you have been able to load a popular image format directly into Flash, giving you incredible freedom in terms of displaying content and working with existing media as well as skinning your applications. With Flash 8, this has advanced even further. You can now load JPG, GIF, and PNG files directly into a movie clip. JPG images are no longer limited to non-progressive .jpg format allowed in Flash 6. GIF images can be transparent and animated, or can be static. PNG images can be transparent, 8 bit, or 24 bit. ...

Get Beginning ActionScript 2.0 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.