Adding Flash Buttons


You can achieve special effects by using Flash objects such as text, buttons and movies. Because Flash graphics are vector-based, their file sizes can be very small, which helps them load more quickly than the equivalent graphic files in the user's browser. Similar to Flash text, you do not need to have Flash to create Flash buttonsyou can develop them directly in Dreamweaver.

Flash buttons have several states, depending on the position of the pointer and whether the mouse button has been clicked. The first state is the appearance of the button when the pointer is not on it. The second state occurs when the pointer is on the button, but the mouse button has not been clicked. The third state occurs when the pointer is on the button, and the mouse button has been clicked. You can create and maintain Flash buttons in Dreamweaver from a set of pre-made button styles.

1.

In the index.html Document window, position the insertion point at the beginning of the line Email:info@yogasangha.com near the bottom of the document.

You'll insert a Flash button on this page.

2.

From the Common category of the Insert bar, click the Media menu and then select the Flash Button icon.

The Insert Flash Button dialog box opens.

3.

In the Style list, scroll down and select Glass-Silver. In the Button text text field type Email. Leave the Font and Size options at their defaults: Verdana and 12 respectively.

A sample area at the top of the dialog box shows a preview of the button style. You can move the mouse over this sample image to see how it will function.

You can edit these settings later, if necessary. The next exercise shows you how.

Note

In this exercise, you leave the optional Link text field blank.

4.

Click the Bg color text field and enter #FFFFCC.

The background color hexadecimal code #FFFFCC represents the background color that will be used for the button. To make the button appear seamlessly on your page, you would instead select the same color as was used for the background of the page.

5.

In the Save as text field, type email-button.swf; then click OK at the upper right of the dialog box. In the Flash Accessibility Attributes dialog box, type Email into the Title field.

You should always name your Flash button files and provide clear accessibility information. If you don't, Dreamweaver automatically assigns generic names.

Tip

The preview does not change dynamically as you alter the settings; it only shows the button style. If you want to view the button as you make changes, you need to click the Apply button so that you can see the changes in the Document window.

The Insert Flash Button dialog box closes, and a button with the specifications you set appears in the document. Because you just inserted the button, it is selected.

6.

With the button still selected, click the Play button in the Property inspector.

Clicking Play allows you to see the Flash button effects in the Document window. The button appears as it will in a browser, and the selection handles disappear. The Play button becomes a Stop button.

7.

In the Document window, move the pointer over the Main button; then click the button.

The button changes to its rollover state when the pointer is moved over it. The button changes to its clicked statea different visual appearancewhen clicked.

8.

Click Stop in the Property inspector. Save the file and preview it in the browser.

The button changes states just as it did in Dreamweaver, depending on the pointer position and mouse click.




Macromedia Dreamweaver 8(c) Training from the Source
Macromedia Dreamweaver 8: Training from the Source
ISBN: 0321336267
EAN: 2147483647
Year: 2006
Pages: 326

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