Macromedia Flash 8 Bible Free Open Book

Macromedia Flash 8 Bible

Previous Page
Next Page

Phase 5: Finalizing the Component

You've completed all of the scripting for the Gallery component — Congratulations! You can now deploy Flash movies with the Gallery component. In this last section, you learn how to enable inspectable properties of the Gallery class to display in the Parameters tab of the Property inspector (or Component Inspector panel).

Adding the Component Definition

If you open the Library panel of the main_starter.fla document, you can see that the symbol type of the Gallery symbol is a Movie Clip. In order to convert the component to a fullfledged component (complete with component icon!), you need to specify the Gallery class in the Component Definition dialog box.

  1. With the main_starter.fla document active, open the Library panel (Ctrl+L or z+L).

  2. Right-click (or Control+click on Mac) the Gallery clip, and choose Component Definition.

  3. In the Component Definition dialog box, type com.themakers.Portfolio.Gallery in the AS 2.0 Class field, as shown in Figure 35-13. Click OK.

  4. To see the inspectable parameters, you can repeat Step 2 to see the parameters automatically created for you by Flash 8, as shown in Figure 35-14.

  5. To see the new parameters, select the cgl instance of the Gallery component on the Stage and open the Property inspector. When you select the Parameters tab, you should see the new inspectable parameters as shown in Figure 35-15.

Image from book
Figure 35-13: The Component Definition dialog box
Image from book
Figure 35-14: The updated Component Definition dialog box
Image from book
Figure 35-15: The Parameters tab for the Gallery component

Now, you can change the thumbnail height, server host, and thumbnail script values directly in the Property inspector.

Note 

You still need to specify an items value for the Gallery instance in ActionScript code, and invoke the load() handler to initiate the thumbnail loading process.

Changing Script Paths for Final Deployment

When you're ready to deploy a Flash movie featuring the Gallery component, keep in mind that you may very likely need to change to the values used in the frame 1 script to initiate loading of the XML data from the files.php script. Make sure you specify a valid Web folder name (or path) as the dir value appended to the files.php filename in the XML.load() handler. You may also need to update the name and path to the resize.php script in the onFileData() handler written within the frame 1 script.

Web Resource 

We'd like to know what you think about this chapter. Visit www.flashsupport.com/feedback to send us your comments.


Previous Page
Next Page
Index: [A][B][C][D][E][F][G][H][I][J][K][L][M][N][O][P][Q][R][S][T][U][V][W][X][Y][Z]


     Main Menu
Table of Contents
Back Cover
Macromedia Flash 8 Bible
Foreword
Preface
Part I: An Introduction to Flash Web Production
Part II: Mastering the Flash Environment
Part III: Creating Animation and Effects
Part IV: Integrating Media Files with Flash
Part V: Adding Basic Interactivity to Flash Movies
Part VI: Distributing Flash Movies
Part VII: Approaching ActionScript
Part VIII: Applying ActionScript
Part IX: Integrating Components and Data-Binding
Chapter 33: Using Components
Chapter 34: Binding Data and Events to Components
Chapter 35: Building an Image Gallery Component
Creating a Plan
Phase 1: Setting Up the Gallery Class
Phase 2: Loading Thumbnails into the ScrollPane
Phase 3: Displaying the Full-Size JPEG Image
Phase 4: Enhancing the Thumbnail and Image States
Phase 5: Finalizing the Component
Summary
Part X: Expanding Flash
Part XI: Appendixes
Index
List of Figures
List of Tables
List of Listings
List of Sidebars


More Books
PHP Hacks
Processing Xml With Java - A Guide To Sax, Dom, Jdom, Jaxp, And Trax
The Koran (Holy Qur'an)
Macromedia Flash 8 Bible
Search Engine Optimization for Dummies
YouTube Traffic
PHP 5 for Dummies
Harry Potter and The Chamber of Secrets
Harry Potter and the Sorcerer's Stone
The Pilgrim's Progress
Wireless Hacks
Flash Hacks. 100 Industrial-Strength Tips & Tools
PayPal Hacks. 100 Industrial-Strength Tips and Tools
Amazon Hacks
Pdf Hacks
The Da Vinci Code
Google Hacks
The Holy Bible
Windows XP For Dummies
Harry Potter and the Half-Blood Prince
Seo Book
Upgrading and Repairing Networks
Macromedia Dreamweaver 8 UNLEASHED
Windows XP Annoyances
Windows XP Hacks
Microsoft Windows XP Power Toolkit
Teach Yourself MS Office In 24Hours
iPod & iTunes Missing Manual
PC Hacks 100 Industrial-Strength Tips and Tools
PC Overclocking, Optimization, and Tuning - 2th Edition
PC Hardware In A Nutshell 3rd Edition
PC Hardware in a Nutshell, 2nd Edition
Upgrading and Repairing PCs
Google for Dummies
MySQL Cookbook
Teach Yourself Macromedia Flash 8 In 24 Hours
PHP CookBook
Sams Teach Yourself JavaScript in 24 Hours
PHP5 Manual
Free Games Paper Airplanes
500 Juegos Gratis 500 Giochi Gratis 500 Jeux Gratuits 500 Jogos Gratis 500 Kostenlose Spiele