How to Make an SWF File

By Foye Robinson

Shockwave Flash (swf) was created by Adobe to display vector graphics, text, video and sound on the web. If you have Flash, you can easily publish animated objects as SWF files within the application. In fact, Flash generates the codes for your web page that can be added to your HTML file. Here's how to create a SWF file.

Things You'll Need

  • Macromedia or Adobe Flash, Text Editor

Creating SWF File

Step 1

Create a new document in Flash.

Step 2

Add your animated text, graphics or video you want to use to your Flash stage.

Step 3

Import any graphics or text from the Flash library or an outside file that you created in an image editor (optional). Select "File/Import" from the menu to import the image.

Step 4

Complete your animation and check that it works properly by selecting "Control/Test Movie" (shortcut: Ctrl+Enter) from the menu.

Step 5

Save your Flash file and accept the .fla default.

Step 6

Publish your file by choosing "File/Publish Settings" from the menu.

Step 7

Place a check mark beside HTML and SWF in the "Format" tab.

Step 8

Change the file names for your HTML and SWF in the text box if you so choose, and click on the yellow folder on the right to change the location for your file(s). Flash will automatically create an HTML and SWF file for you.

Step 9

Select the HTML tab (which will display only if you placed a check mark beside HTML under the Format tab). Here you can change the Flash version, dimensions, play options, quality, window mode and alignment for your SWF file.

Step 10

Hit "Publish" and then "OK."

Step 11

Preview your HTML file in a web browser and check its source code. The code should look similar to this:You can manipulate the HTML code for your SWF file from within the HTML code too.

Giving Your SWF File a Transparent Background (with Flash)

Step 1

Select the HTML tab under File/Publish Settings in Flash.

Step 2

Click on the drop-down by "Window Mode" and change it to "Transparent Windowless."

Step 3

Hit "Publish" and then "OK."

Step 4

Save the file and copy the HTML code generated in Flash into any HTML pages in which you'd like to use it.

Giving Your SWF File a Transparent Background (with HTML)

Step 1

Open the HTML file you saved in Flash with a text editor. The code should be similar to:

Step 2

Add the following code above thetag:

Step 3

Save your HTML file and preview it in a browser.

Step 4

Reuse the code in any other HTML pages in which you want it to appear.

Tips & Warnings

  • Your web browser must support Flash for it to display SWF files.

References & Resources