Chapter 33. Building an Image Gallery Component

In Chapter 32, you learned how to use many of the user interface and data components of Flash CS4. Now that you're familiar with common production tasks associated with components, you can start to learn how to create your own custom components. In this chapter, you learn how to build a Gallery component. By the end, you will know the steps and procedures required to build a fully functional component.

Also in this chapter you learn how to build a Flash movie that can dynamically load a list of JPEG files that the user can browse as a series of thumbnails. When the user clicks one of the thumbnails, a larger version of the image loads into the Flash movie. To see the final project, open your browser and go to www.flashsupport.com/fb/as3/gallery.

Note

Make sure that you have Flash Player 10 installed to view the completed project.

At this location, you see the interface shown in Figure 33.1. When you click an image thumbnail, the original JPEG loads into the area below the thumbnail bar. The active selection within the bar is highlighted with a bevel filter. When you click another thumbnail, the previously selected thumbnail transitions to a muted grayscale version.

Figure 33.1. The completed project

Creating a Plan

Before you can start to build the Gallery component, ...

Get Adobe® Flash® CS4 Professional Bible 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.