Adding Flash Files to a Webpage in Dreamweaver

Dreamweaver 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 webpage; this time, you’ll learn how to insert Flash files with the SWF extension. The process is similar to inserting an image file, but Dreamweaver has more settings for Flash.

1 CREATE OR ACQUIRE A FLASH FILE
For this tutorial, we assume that you already have a completed Flash file (in SWF format) and you want to add it to your webpage using Dreamweaver. To create a Flash file, like the Turtle Puzzle game we’re using, 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.


KEN RIDDICK

2 SAVE FILE TO YOUR ROOT FOLDER
Before you start, 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,” at www.layersmagazine.com. Defining a site enables you to manage files and folders without breaking links using Dreamweaver’s Files panel (shown here).

3 OPEN OR CREATE A NEW PAGE
To add a Flash file to a webpage, open an existing page or create a new document by choosing File>New and specifying the file type in the New Document dialog. In this example, we’re creating a new page from a Dreamweaver template. You can add a Flash file to any webpage. In any case, it’s always good practice to save a new page before inserting a Flash file.

4 USE THE INSERT FLASH OPTION
Click to insert the cursor where you want the Flash file to appear on your webpage 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.

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 on the file to select it.

6 SET ACCESSIBILITY OPTIONS
If you have accessibility options turned on, you’ll be prompted to add alternative text. Enter a short text description of the Flash file. Use the Access Key and Tab Index options in the Object Tag Accessibility Attributes dialog 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 to close the dialog and the Flash file is inserted into your page.

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. As you’ll learn in the following steps, you can use these options to alter the size of the Flash file and the way it’s displayed on your page. Clicking the Edit button will open the file in the Flash program (if you have the program on your hard drive).

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 clicking the Play button displays the game options and images. (Note: When the Play button has been activated, the button text changes to Stop.)

9 TEST THE FLASH FILE
When the Play button is clicked, all the features of a Flash file are activated using the Flash Player, just as they would if the file were displayed in a Web browser. As you can see here, we’re testing this Flash puzzle game by clicking-and-dragging to move the pieces into place.

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 Loop box to set the file to replay continuously; uncheck the box if you want the file to play only once. Checking on the Autoplay box causes the file to begin to play as soon as the page is loaded into a browser.

11 SPECIFY OTHER OPTIONS
Change the Scale setting to specify if the Flash file will have a border. Use the Quality setting to control the file quality that will be displayed. Note: The higher the quality, the longer it will take to download.

12 UPLOAD THE SCRIPTS FOLDER
When you insert a Flash file as we did in this tutorial, Dreamweaver automatically creates a script file to accompany it and saves it in a folder, appropriately called “Scripts.” Make sure to upload the entire Scripts folder when you publish your Flash file and webpage to your server or it may not display properly.

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 shouldn’t happen when the page is published and viewed online in Internet Explorer, and Firefox (shown here) doesn’t use a security prompt with Flash.

Visitor Comments »

 

I tried this and I can see the flash file on Firefox but not on safari or opera. Why?

 

Comment by Miriam | July 31, 2008 @ 3:51 am

 

I’m not able to view my file after I upload my swf and Scripts folder. I can view flash on other websites and the when I preview the page in dreamweaver everythings fine. Not sure what is wrong. Here is my link below. PLEASE HELP!

http://www.msu.edu/~ander916/experiment.html

 

Comment by Kenny Jackson | August 7, 2008 @ 6:25 pm

 

Your tutorial is wonderful, but I can see the flash perfectly in the preview in Dreamweaver and when I preview in the browser, but when I go live, it’s not there! Can you help? I’ve just spent EIGHT hours trying to figure out why!!!

 

Comment by Judith Balian | August 8, 2008 @ 12:19 am

 

Sorry to learn some of you are having trouble with your Flash files. Here are a couple of common problems to double check:
* Make sure you are working with a .swf file (if you’re using .flv file, you’ll want to follow the instructions for embedding Flash videos)
* Make sure that you upload all of the files to your server in the same relative location as they are on your local computer
* Make sure you are uploading the entire Scripts folder that is generated by Dreamweaver when you add the .swf file, and that the Scripts folder is in the same relative location to the HTML and .swf files on your server and local computer
If you’ve done all that and you’re still having trouble, consider downloading the public beta of Dreamweaver CS4 which embeds Flash files in a slightly different way from CS3 and may solve your problems. You can download the beta for a free trial from http://labs.adobe.com/technologies/dreamweavercs4/

You may also want to watch the video by RC at BlipTV. He created a nice little video tutorial that covers this same process for inserting Flash files with Dreamweaver. Sometimes watching someone go through a lesson like this on video can help you figure out what you may be missing.

I hope that helps and I wish you all the best,

 

Comment by Janine | August 8, 2008 @ 2:09 pm

 

what a nice tutorial!!

hai, a i’m newby in dreamweaver. i have same troubles here when add flash file into dreamweaver template. actually when a made my template. the file is working perfectly. But when i change the template. Dreamweaver ask me wheater to update the template to other pages that i made generated from template i have made before. i choose to ‘update’ when i made change to template. but problems came… other pages i made from template can’t show the flash file.
please help me

sorry for my bad english lang.
Thx

 

Comment by Jipi | August 10, 2008 @ 2:25 pm

 

i’m having the same problem with most of you. i upload my files but flash files dont appear. works fine in preview mode with firefox but not with safari. really confused.

 

Comment by sm | August 18, 2008 @ 5:33 am

 

Hi all…I was having the same problem and just figured it out. As described above (read all instructions!!), I just uploaded the SCRIPTS folder to the server and presto!! It works like a charm.

 

Comment by Justin | September 15, 2008 @ 9:27 pm

 

Hi all,

I also had these problems, but like Justin solved it, I am also trying….. but in the meanwhile I am so confused… how can I upload the scriptsfolder?? I think Dreamweaver isn’t really user-friendly. It assumes a lot of basic knowledge is already there. A normal FTP-upload program is a lot easier. I can’t get my .swf worked.
In the right-corner at the bottom it says local files but when I save, it asks to transfer depdendent files also. But where are my ftp-files?? I free simple programs you clearly see the local and ftp folder…
Thanks in advance

ps since I see so many people have these problems, I still think I am not really stupid :)

 

Comment by Mike | September 19, 2008 @ 10:20 am

 

 

Comment by RC | October 7, 2008 @ 5:51 pm

Leave us a comment

Comments RSS | TrackBack URI

Back to Top

 
 
Advertisement
Creative Suite Tutorials
  1. Photoshop Photoshop
  2. Illustrator Illustrator
  3. Indesign Indesign
  4. Dreamweaver Dreamweaver
  5. Fireworks Fireworks
  6. Premiere Premiere
  7. Flash Flash
  8. After Effects After Effects
  9. Lightroom Lightroom
  10. Acrobat Acrobat


From our Partners
Subscribe to Layers Magazine
 
 
 
  • Back to the Layers Magazine Homepage
  • Creative Suite Tutorials
  • Layers Magazine
  • Reviews on top products
  • Layers Magazine Reader Forums