How Do You Embed an SWF File Into Your Web Page?
Find or Upload a Video
- You'll need to find out the URL for the flash video you want to embed into your web page. For this example, we will use the URL http://example.com/flash.swf. If the SWF file is on your computer, you will need to upload it to your website. Use an FTP program to connect to your web server and upload your SWF flash video to your website if necessary. If you don't have an FTP program, you can download a free one like the open-source FTP program FileZilla, which will let you connect to your web server and transfer files back and forth between the server and your computer (see "Resources"). If you upload the SWF file to your web server, then you will need to change the URL that you are using to reference it.
Editing Your Web Page
- Open the HTML file that you want to embed the flash file into (if necessary, download it from your website onto your computer and open it in a text editor). Insert the following code into the HTML file where you want the SWF file to appear. The first line of the code is "<object>", which controls how wide and tall you want your SWF object to be. The next line is "<param name="movie" value="http://example.com/flash.swf">", which defines the name of the video and the url at which it is located for Internet Explorer. The next line of code is "<embed src=" http://example.com/flash.swf ">", which will define the video and size parameters for Netscape-based browsers. Finish the code up with "</embed> </object>" to close the two tags, and your code editing is done.
Finally, save your HTML file and transfer it to your web server via your FTP program. If you visit the web page with your browser, you will see your SWF flash file playing on the page. You can change the dimensions of your SWF file by altering the height and width values in the code you put on your HTML page.