The SWF file path can be relative to the location of your HTML file or the fully qualified, absolute path of your SWF file. For example:
- If the SWF file is in the same folder as the HTML file, you only need the filename of the SWF file.
- If the SWF file is in a subfolder, the path is something like "subfolder_name/movie_name.swf" (without the quotes).
- If the SWF file isn't in the folder with the HTML file, use "../" for each level up from the folder with the HTML file. (Don't include the quotes in the syntax.) So "../../../separate_folder/movie_name.swf" goes up three levels from the folder with the HTML file before going down into the "separate_folder" to find the SWF file.
- A fully qualified path is the same thing as a complete URL (that is, http://www.myDomain.com/flash_content/movie_name.swf.)
You can also use the Publish command in Flash to create a basic HTML file containing the OBJECT tag. Then copy and paste the HTML code within the OBJECT tag into your own HTML file. The, the name of your SWF file is already correctly specified in the HTML code.
The code above is the minimum required to insert a SWF file in your HTML file. There are additional attributes you can specify for these tags to control the details of how Flash Player plays your SWF file. For information, see Flash OBJECT and EMBED tag attributes.
Test your HTML page in all web browsers you want your intended audience to be able to use.
Note: Dreamweaver, Adobe's HTML authoring tool, can easily embed a SWF file into an HTML document for you. Dreamweaver allows full control of the design of the page that contains the SWF file. For more information, see the Dreamweaver product page.