Customizing the FlashPaper Viewer


FlashPaper is perfectly suited for helping content contributors make documents of all kinds available on the Web. Moreover, the FlashPaper viewer is well suited to hosting Flash documents of all types. However, a large part of being a designer is to make choices and exercise control over the layout and content of a page. Some documents, although perfect candidates for FlashPaper conversion, are not intended to be copied and/or printed. The documentation that accompanies FlashPaper includes information on the FlashPaper API, with details on exacting more control over the FlashPaper viewer programmatically. These details, however, are meaningful only to the most adept Flash programmers. How can the Dreamweaver designer take advantage of FlashPaper's potential customization?

Dreamweaver has a rich history of extensibility and a key focus on maintaining the openness of the program. In this lesson, you'll install a Dreamweaver extension, the FlashPaper Viewer, that allows you, at design time, to specify the Flash document (converted with FlashPaper) to display, the initial magnification, the initial page of the document, and which toolbar controls are available. The FlashPaper Viewer, built by this book's author and included on your CD-ROM, falls into the extension category called Flash element. A Flash element contains a series of modifiable parameters that are set though Dreamweaver's Tag panel. Once set, the parameters are inserted in the page's Flash document code.

Note

The following technique is intended to be used by Dreamweaver designers in conjunction with Contribute sites, but the Flash document is not modifiable by Contribute users.


This lesson takes you through the full extension experience, from installation to application and testing.

1.

Close Dreamweaver. In the extensions folder of the Lesson 6 files, double-click FlashPaperViewer.mxp to launch the Macromedia Extension Manager. Click Agree to accept the licensing agreement and proceed with the installation. When Dreamweaver tells you that the extension has been fully installed, click OK. To view information about the just-installed extension, select its entry. When you're done, close the Extension Manager and start Dreamweaver.

The installation process can also be started by choosing Commands > Manage Extensions to open the Extension Manager and then selecting File > Install Extension. After the extension is installed, you'll need to quit and restart Dreamweaver.

Tip

If I don't have work underway in Dreamweaver, and I know the extension will require a restart, I often close Dreamweaver first and follow the procedure outlined in step 1.

2.

In Dreamweaver's Files panel, expand the hr folder in the site root and open the info folder; double-click employee_records.htm to open it in Dreamweaver. Place your cursor below the introductory paragraph. From the Insert bar, switch to the Flash elements category and choose FlashPaper Viewer. When the Save Flash Element dialog box appears, navigate to the media folder in the site root and enter bg_emp_records.swf in the File name field. Click Save when you're ready.

Whenever you insert a Flash element, you're actually generating a .swf version of a compiled Flash document type called a component (Flash components are identified by a .swc filename extension). The .swf version of the component is what is actually referenced in the code and viewed in the browser.

Inserting a Flash element makes a special section of the Tag panel appear, which lists all the available parameters. With the FlashPaper Viewer extension, the first task is to specify a source Flash document previously converted in FlashPaper 2.

3.

In the Tag panel, click in the value column next to the source parameter; the initial default placeholder is document.swf. Select the folder icon in the source value, and when the Select File dialog box opens, navigate to the media folder in the site root and choose osha3110.swf. Click OK to confirm your selection. From the Property inspector, choose Play to see the FlashPaper Viewer with the selected Flash document.

Although the Flash document is perfectly viewable at this stage, you can make it more useful by changing the initial page that displays and eliminating some unneeded controls, such as "Find and open in new browser." With the FlashPaper Viewer, any of the controls appearing in the toolbar can be enabled or disabled.

4.

In the Tag panel, select the currentPage attribute and change the value to 4. Next, choose the showFind attribute and select (No) from the list. Finally, select the showPop attributewhich controls the "open" in the "new browser" controland choose (No) from the list. Select Play in the Property inspector to preview the changes.

Tip

If you want to change the default zoom, enter width to show the width of the page, page to show the entire page, or any number from 10 to 999 to specify a percentage value. For example, enter 150 to view the page at 150% magnification.

If desired, you can adjust the dimensions of the Flash document while playing the preview. For visual adjustment, drag any of the sizing handles; for a more precise change, enter new width and/or height values in the Property inspector.

Tip

For documents with outlines, you can also control the visibility as well as the width of the outline panel. To enable or disable the panel itself, alter the showSidebar parameter. To change the width of the panel, set sidebarWidth to the desired pixel value.

5.

Choose File > Save to store the altered page. Place the page on the site by selecting Check in from the File Management menu button on the Document toolbar. Select the osha3110.swf and bg_emp_records.swf files in the media folder, and check those files in as well.



Design and Deploy Websites with Macromedia Dreamweaver MX 2004 and Contribute 3(c) Training from the Source
Design and Deploy Websites with Macromedia Dreamweaver MX 2004 and Contribute 3: Training from the Source
ISBN: 032128884X
EAN: 2147483647
Year: 2006
Pages: 130
Authors: Joseph Lowery

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net