|
Free Open Book
Macromedia Flash 8 Bible |
Using Flash ElementsDreamweaver 8 ships with only one example of a Flash element, but it is a preview of what designers building hybrid Flash-HTML applications can do with custom components. In this section, we go through the steps for using the Image Viewer Flash element (originally introduced with Flash MX 2004).
Inserting the Picture Viewer Flash ElementInserting a Flash element is just as easy as inserting one of the Flash objects we described in the previous section; however, there is a separate category for elements in the Insert bar. Choose Flash Elements from the Category menu and you will see one lonely icon for the Image Viewer, as shown in Figure 38-13. The good news is that Image Viewer is a fun, functional example and there is plenty of room for you to add more Flash elements as they become available. Figure 38-13: Image Viewer is the first Flash element available in Dreamweaver, but the menu system has been designed to support the addition of more custom components.
When using a Flash element that interacts with multiple files (such as the bitmaps that you are going to load into the Image Viewer), the organization of your files becomes very important. To begin the example for this section, we actually defined a new site called Image Viewer so that we could specify the location for the HTML files, Flash file, and source image files. The HTML file and the .swf file generated by Dreamweaver can both be stored in our main directory, and the JPEGs are all stored in a subfolder called images. This is a simplified structure, and a realworld project might include many more files, but it is a good start for a logical system.
After you define a site (or specify a location for saving your various files), create a new HTML document as we described for the Flash object examples earlier in this chapter. To insert the Image Viewer Flash element, follow these steps:
Using the Tag Inspector to Define Flash Element ParametersAlthough you can edit or modify the parameters for a Flash element manually in the Code window, it is much easier to use the integrated Tag inspector that was first introduced with Dreamweaver MX 2004:
Figure 38-14: The Tag inspector provides a quick interface for modifying the parameters of the Image Viewer Flash element. The settings for the Image Viewer enable you to create an interactive slide presentation from a series of images and to choose a range of options for controlling the playback of the file and the animated transitions. These settings save an enormous amount of time and the end result is a clean, professional-looking slide presentation with cool transitions and a functioning UI. Aside from the standard Dreamweaver settings for fonts, colors, border elements, and links, there are pace, style, and playback options for the Flash SWF presentation generated by the Image Viewer Flash element. Although you can make choices for these settings before you load in a series of images, it makes sense to choose your images first so that you have something to look at when you test the file. Working with Image ArraysIf you are a code-oriented designer (or a design-savvy coder), the title of this section will not sound intimidating, but if you are the type of person who usually runs from anything that sounds like "programming," don't give up yet. The real beauty of the simple interface-based architecture of Flash elements is that it makes it very easy for almost anyone to edit little pieces of the code used to generate an interactive Flash movie without having to get overwhelmed by a lot of syntax or a complicated menu system. All you need to know is that the imageURL line in the Tag inspector controls what images load in the Image Viewer and the order in which they appear.
Figure 38-15: The Edit Array dialog box makes it possible to specify the display order for images you want to load in the presentation by typing the path to each image or by browsing to select them one by one from your file list. The other two (optional) arrays that relate to the images you have added to the presentation are:
Previewing Animated Flash ElementsAfter you have added some images — and perhaps some captions and links — to load into the Image Viewer, you can preview the animated presentation in the following two ways:
Figure 38-16 shows how the published Picture Viewer looks in a browser window with the images and captions we have added.
Figure 38-16: The finished flowerViewer.html file with the Image Viewer Flash element file (FlowerGallery.swf) visible in a browser window
Editing Flash Element ParametersIf you are not yet impressed by the functionality of the Image Viewer Flash element, you can adjust the transition animations or the other graphic elements in the presentation by changing settings in the Property inspector or by opening the Tag inspector to edit parameters until you are satisfied with the final result. Click the text line of any parameter in the Tag inspector to access available menu options or to edit the text directly. Some of the parameters are simple on/off toggles, but the transitionsType parameter can be set with a range of options available from a drop-down menu, as shown in Figure 38-17.
Figure 38-17: You can use the various transition styles available from the transitionsType drop-down menu in the Tag inspector to change the Flash animation in your Image Viewer presentation without ever touching a keyframe in Flash or typing a single line of code. Try out a few of these transition styles and reflect for a moment on how long it might have taken to author the Flash animation manually. Then think about how much fun you could have with a whole library of Flash elements — smiling yet? |
Main Menu |
| 500 Juegos Gratis | 500 Giochi Gratis | 500 Jeux Gratuits | 500 Jogos Gratis | 500 Kostenlose Spiele |