Accessibility
 
Home > Products > Dreamweaver > Support > Inserting Media
Dreamweaver Icon Macromedia Dreamweaver Support Center - Inserting Media
Using button templates with Dreamweaver

You must create a Generator template file in order to use the new button style in Dreamweaver 4. Once you've created this file, you can also distribute it to other users.

To create a button template file:

1 Open the FLA file, then export it as a SWT by choosing File > Export Movie and saving as a Generator Template file type. It's a good idea to use the same name for both files, for example, myButton.fla and myButton.swt.
2 The Export Generator Template dialog box appears. (You can use the default settings. For specifics on changing these elements, see your Flash documentation.) When you've finished making selections, click OK to save the file.
To use the new SWT file to add a Flash Button object:

1 Place the custom SWT file you created in Flash in the Dreamweaver 4/Configuration/Flash Objects/Flash Buttons folder.
2 Launch Dreamweaver and open an existing file or create a new document file and save it. (You cant use the Flash Button or Text objects without saving a file first.)
3 Click the Insert Flash Button icon in the Objects panel.
In the list of styles, the button you created should now be listed with the same name as the file.
4 Select the new style.
5 Enter the text, font, color, size, links, and so on, in the appropriate fields found in the Insert Flash button dialog box. For more information on inserting Flash buttons in Dreamweaver, see Using Dreamweaver.
6 Click OK to insert the button into your document.
 
Creating samples for new button templates
If you create your own button templates, you may also want to create a sample SWF file so your Web team can see the default text size and font style in the Sample field of the Insert Flash Button dialog box in Dreamweaver 4. The existing sample or "preview" files for the button templates in Dreamweaver 4 are located in the Configuration/Flash Objects/Flash Buttons Preview folder, in the Dreamweaver application folder. Once you've created a preview file, you can distribute it and instruct other users to keep the file in this folder.

To create a sample button SWF:

1 Place the custom SWT file you created in Flash in theConfiguration/Flash Objects/Flash Buttons folder found in the Dreamweaver application folder.
2 Launch Dreamweaver and open an existing file or create a new document file and save it. (You can't use the Flash Button or Text objects without saving a file first.)
3 Click the Insert Flash Button icon in the Objects panel, and select your custom SWT file from the style list.

4 Enter text in the Button Text field. You can enter the text you want your team to use, for example Press Me!, or something generic like Button Text. This text displays in the sample window using the default font style and size.
5 Specify a font type by selecting it from the Font pop-up menu (optional).
This is the default font that users will see when they select the button style. If the default font specified is not on their system, they'll be informed and allowed to select a different font. Specifying a font does not prevent users from selecting whatever font they want, it's simply a way to show a preferred font for the button style and what the text will look like once it's on the button.
6 Specify a font size (optional).
7 Save the file as a SWF in the Dreamweaver 4 Flash Buttons Preview folder.
Click the Browse button next to the Save As field, and navigate to the Configuration/Flash Objects/Flash Buttons Preview folder. Enter a name, including the .swf file extension, in the File Name field and click Save. Be sure to use the same name as you did for the SWT file, for example, myButton.swt and myButton.swf, so that it appears in the sample window.

Note: If you don't create a preview file, Dreamweaver displays your custom button without any sample text.

8 Return to the Insert Button dialog box and select your custom button. A preview of your button, with the default font and text, appears in the Sample window.

If you distribute the SWT and SWF files to other users, be sure they place the files in the correct Dreamweaver folders. The SWT file should be placed in the Dreamweaver/Configuration/Flash Objects/Flash Buttons folder and the SWF file should be placed in the Configuration/Flash Objects/Flash Buttons Preview folder.

You can also download new button templates from the Macromedia Exchange Web site and place them in your Flash Button folder.

To Table of Contents Back to Previous document