Dreamweaver Tutorials

Get Started in Dreamweaver: Define a new or existing Web site

Find out how easy it is to register a domain name

Designing with CSS

When using CSS, What Selector Type Should You Use?

Customize a CSS Layout in Dreamweaver CS3

Align Images with CSS in Dreamweaver

Create a Navigation Bar with an Unordered List and CSS

Compare Layout Options: Tables, Layers, or CSS

Make your site accessible to all your visitors

Where to learn advanced CSS tips and tricks

AJAX and Spry

Create Collapsible Panels with AJAX using Spry

Adding a Drop-Down Menu with Ajax using the Spry features in Dreamweaver CS3

Working with Multimedia

Insert a Flash File using Dreamweaver CS3

Insert a Flash Video File

Convert Video into Flash with the Flash Video Encoder

Using Behaviors

Use Swap Image Behavior to Create Multiple Rollovers

Swap Image Behavior

Use a Behavior to Launch a New Browser Window

Add new features to Dreamweaver with Extensions

Connect an HTML Form to a Script in Dreamweaver

More Resources

Cool online tools you can use on your Web site

Comparing Web design programs and technologies

Video Training

Discover how training videos make learning fun and easy!

Dreamweaver FAQ

Get answers to your questions, and maybe even a few you hadn't thought of yet, in the Dreamweaver FAQ

Total Training Videos

 

Partners and sponsors

Total Training Online Software Training - Try it Now Get Free Access

Dreamweaver FAQ

Get answers to your questions, and maybe even a few you hadn't thought of yet, in the Dreamweaver FAQ.

Dreamweaver CS3 advertisement CS3-DW-125x125

Free Greeting Card, Expires 2-27-07

Trusted by over 7 million customers!

Total Training

IX Web Hosting ad

Inserting Flash Files into a Web Page with Adobe Dreamweaver CS3

BY JANINE WARNER

Inserting Flash Files into a Web PageDreamweaver can insert Flash video (.flv) files, as well as Flash files with the .swf extension. In the last issue, I used  Dreamweaver to add Flash video to a Web page. In this tutorial, you learn to insert Flash files with the .swf extension. The process is similar to inserting an image file, but Dreamweaver has more settings for Flash.

Partners and sponsors

Order Your Dreamweaver Training Video Today!

Step 1 Create or Acquire a Flash File

For this lesson, I assume you already have a completed Flash file (in the .swf format), and you want to add it to your Web page using Dreamweaver. To create a Flash file, like the Turtle Puzzle game I’m using in this tutorial, you’ll need Adobe Flash or a similar program that supports the Flash format. Because Flash is an open standard, you can create Flash files with a variety of programs, including Adobe Photoshop Elements, which uses the Flash format to save automatically generated Web galleries.

Step 1 Create or Acquire a Flash File
—PHOTO CREDIT—Ken Riddick

STEP 2 Save it into Your Root Folder

Before you start, make sure to move or save the Flash file into your root site folder. If you prefer, you can create a subfolder to store your Flash files. If you’re not sure what a root folder is or how to define a root folder in Dreamweaver, refer to my online tutorial: “Defining a Site in Dreamweaver” on the Layers Magazine Web Site. Defining a site enables you to manage files and folders without breaking links, using Dreamweaver’s File panel, shown here.


STEP 2 Save it into Your Root Folder

STEP 3 Open or Create a New Page

To add a Flash file to a Web page, open an existing page or create a new document by choosing File>New and specifying the file type in the New document window. In this example, I’m creating a new page from a Dreamweaver template. You can add a Flash file to any Web page. Either way, it’s always good practice to save a new page before inserting a Flash file.
STEP 3 Open or Create a New Page

STEP 4 Use the Insert Flash Option

Click to insert the cursor where you want the Flash file to appear on your Web page and choose Insert>Media>Flash. Alternatively, you can use the Insert Media button from the Common Insert bar at the top of the Dreamweaver workspace.
STEP 4 Use the Insert Flash Option

STEP 5 Locate the Flash File

In the Select File dialog, browse your drive to locate the Flash file that you want to insert in your page and double click to select the file.
STEP 5 Locate the Flash File

STEP 6 Set Accessibility Options

If you have accessibility options turned on, you will be prompted to add alternative text. Enter a short text description of the Flash file. Use the Tab index and Access key options to include a key command to start or control the Flash file if you want to provide an alternative to those with accessibility challenges. Click OK and the dialog box closes and the Flash file is inserted into your page.
STEP 6 Set Accessibility Options

STEP 7 Specify Flash Settings

Dreamweaver displays Flash as a solid, gray box with the dimensions of the Flash file. Click on the gray box to display the Flash options in the Property inspector at the bottom of the workspace and, as you learn in the following steps, you can use these options to alter the size and the way the Flash file is displayed on your page. Pressing the Edit button will open the file in the Flash program (if you have the program on your hard drive).
STEP 7 Specify Flash Settings

STEP 8 Preview with the Play Button

Click on the Play button in the Property inspector to play the Flash file. In this example, the Flash file is a puzzle game so pressing the Play button displays the game options and images. (Note: When the Play button has been activated the button text changes to Stop.)
STEP 8 Preview with the Play Button

STEP 9 Test the Flash File

When the Play button is pressed all of the features of a Flash file are activated using the Flash Player just as they would be if the file was displayed in a Web browser. As you can see here, I’m testing this Flash puzzle game by clicking and dragging to move the pieces into place.
STEP 9 Test the Flash File

STEP 10 Adjust Loop and Autoplay Settings

You can make a number of adjustments to the way a Flash file displays by changing the settings in the Property inspector. Check the box next to loop to set the file to replay continuously, uncheck the box if you want the file to play only once. Checking Autoplay causes the file to begin to play as soon as the page is loaded into a browser.
STEP 10 Adjust Loop and Autoplay Settings

STEP 11 Specify Other Options

Change the Scale settings to specify if the Flash file will have a border. Use the Quality settings to control the file quality that will be displayed. Note that the higher the quality, the longer it will take to download.
STEP 11 Specify Other Options

STEP 12 Upload the Scripts Folder

When you insert a Flash file like I have in this tutorial, Dreamweaver automatically creates a script file to accompany it and saves it in a folder called Scripts. Make sure to upload the entire Scripts folder when you publish your Flash file and Web page to your server or it may not display properly.
STEP 12 Upload the Scripts Folder

STEP 13 Preview in a Browser

It’s always good practice to preview your work in a Web browser after you upload it. You can also preview your pages in a browser on your local hard drive. And here’s a tip: when you preview a page with a Flash file and the JavaScript locally, Internet Explorer treats the script as a potential threat on your hard drive and prompts you with a security warning in the Information bar. This should not happen when the page is published and viewed online in Internet Explorer, and Firefox, shown here, does not use a security prompt with Flash.
STEP 13 Preview in a Browser

This column originally appeared in Layers Magazine February, 2008.

Partners and sponsors

Shutterfly.com