April 20, 2011
Embedding a SWF File in a blog entry
In order to embed a SWF file as you see in the demonstration below several steps are required, and a copy of Dreamweaver. (Any version)
- Start by saving the SWF files to your local hard drive in a convenient location.
- Open Dreamweaver and create a blank HTML page. Save to any location. (Ignore any prompts concerning defined sites.)
- Using Dreamweaver insert the SWF into a blank page. This will create a relative link to the file.
- Open the page in Code view and look for the TWO instances of the SWF file name that are found in the code block. They will look something like this depending on the version of Dreamweaver you are using:
- “”<param name=”movie” value=”file:///Macintosh HD/Users/kim/Documents/Adobe/Flash Pro CS5/Spring/Spring_finished.swf” />””
- “”<object type=”application/x-shockwave-flash” data=”file:///Macintosh HD/Users/kim/Documents/Adobe/Flash Pro CS5/Spring/Spring_finished.swf” width=”476″ height=”320”>””
- Open your blog and go to the Media Library section of the menu on the left and click Add New.
- Browse to and upload the SWF file.
- Note the path to the SWF file displayed in the library. It will appear like this: “”http://weblogs.pbspaces.com/edtech/files/2011/04/Spring_finished.swf””
- Copy the embed code from your Dreamweaver page. Be sure to get everything from the opening to the closing “object” tags.
- Create your new posting in your blog and click on the HTML tab to go to code view.
- Paste in the code block.
- Replace the absolute path to the SWF file in the two locations of the code block with the URL created in the Media Library.
- Add additional content to your posting if desired and Publish.
The steps sound pretty complicated but in essence you are doing four things:
- Generating an embed code in a blank Dreamweaver page
- Uploading the SWF file to your Media Library
- Pasting Dreamweaver’s code into a new blog posting
- Replacing the path to the SWF file to point to the file in your library.
The little demonstration below shows the SWF file in place and will replay if you reload this page.