|Now that you have finished and tested your Flash website within the Flash program and you are happy with the finished version, you are ready to publish to the web. However, you will need more than just the finished .swf file. You will also need some HTML files that work with this .swf file on the web. Without these HTML files, you cannot display your Flash movie in the web browser. This is commonly called "wrapping" the .swf file in HTML. So where do you get these HTML files? When you "publish" your movie in Flash, the program will generate these files for you based on certain choices you make in the Publish Settings dialog box. Let's open your .fla file in Flash and get started.|
Once you have your finished website movie open in Flash, go to the Property Inspector and click on the Publish: Settings button to open the Publish Settings dialog box.
Step 1. Format Tab Settings. Click on the Formats tab and you will see a list. We need Flash to generate the first two from this list. The finished MySite.swf file of your Flash website movie and one of the HTML files that will wrap your .swf file. As with most websites, the first webpage that the browser always looks for is the index.html file. So we will name this wrapper file index.html. Put a check in the first two checkboxes and name your files as below.
Flash (.swf) -- MySite.swf
HTML (.html) -- index.html
If you wish to store your files in a different folder from the one we are using, click on the small folder button to open the Select Publish Destination dialog box and choose a different folder.
Step 2. HTML Tab Settings. Click on the HTML tab. We are publishing for the web, so set the Template drop-down list to Flash Only and check the Detect Flash Version box underneath. We will use the default settings for the rest of this tab. But before we move on, we need to tell Flash to generate a few more files. Click on the Settings button to open the Version Detection Settings dialog box. As stated before, the index.html file is the first file that will be loaded into the browser. This file is coded to check for a Flash Player on the viewer's computer. If there is a Flash Player, then the next file that will be loaded is the HTML file that will display your .swf file. We will call this second HTML file MySite_content.html. If there is no Flash Player detected, a thrid HTML file will tell your viewer that they need to download the latest version of the Flash Player and display a link button that will take him to the AdobeR - MacromediaR download site. We will call this file MySite_alternate.html. So under the Filenames section, name these files as follows.
Detection File -- index.html
Content File -- MySite_content.html
Alternate File -- MySite_alternate.html
Click OK to return to the Publish Settings dialog box.
Step 3. Flash Tab Settings. Click on the Flash tab. We will be publishing for Flash Player 7 so choose this from the Version drop-down list. We do not want anyone to be able to reverse your .swf file back to an .fla file and steal all your hard work. So in the Options section, put a check in the box next to Protect From Import. We will keep the rest of the default settings for this tab.
Version: Flash Player 7
Options: Protect From Import
Now click the Publish button and Flash will generate these files. You will see an indicator as Flash is working. When it is finished, click OK to close the dialog box.
Step 4. Test And Upload. Flash should have put the files in your folder. You will also see a small alternate.gif image for the download link on the MySite_alternate.html page. Finally, there will be a flash_detection.swf file that will be used by the index.html file to detect if there is a Flash Player. You will upload these generated files along with the external text files and the Portfolio.swf file that we created earlier. Here is a complete list of the files you will need to upload to your web site.
If you would like to test your website a final time before you upload to the web, click on the index.html file to view your movie. You can also click on the MySite_alternate.html file to view the download message. You can customize this message by changing the HTML code for this webpage. You can use any FTP program to upload your files to your website.
Macromedia Flash MX 2004 Workspace