Logo link to Tomontheweb.ca

Creating a Flash Document: Part 6

Publishing a Flash Document

Documents you create in Flash use the FLA extension which indicates the file is the one that can be opened in Flash and changed. What you can’t do is open a FLA created in a later version the application in an earlier version. For example, you can’t open FLA files created in this version of Flash in Flash MX Professional 2004.

For users to actually interact with your Flash movie, the FLA files need to be transformed (The common word for this process is “compiled”.) into SWF files. SWF (pronounced “swiff”) stands for Small Web Format and these files are referred to as Flash applications. They are also called “movies” because the original purpose of Flash was for web animations and they were called “movies”.

You can “play” your Flash movie by publishing the FLA file. The end result of that process is the SWF. Your Flash application can be played in a number of ways:

The latest version of the Flash Player can be obtained at

http://www.macromedia.com/downloads/

  1. In Flash, open the file you have been working on.
  2. Test the movie by pressing Control-Enter (PC) or Command-Return (Mac).

The movie will open in a separate window. This form of SWF is great for Development purposes. Use it to test your movie’s functionality as you proceed through the production process.

  1. Close the window by clicking the Close box.Select File > Publish Settings
  2. The Publish Settings dialog box will open. Another way of opening this dialog box is to click the Settings button on the Property Inspector.

The Flash and HTML check boxes are checked by default on the Formats tab. When you publish a document the .SWF and the .HTML files are created in the same folder as the HTML file. You can publish the files with different names or in different locations by changing the filename and the path in the File field.

Each FLA will have a default for the Publish Settings. If you change the settings the profile will be updated for the FLA file as well. You can also create multiple publish settings profiles for a FLA. This is a handy feature to have if you publish your files to multiple locations. To create a new profile click the New Profile button (the “+” sign.) and give the profile a new name. You can then change the profile or switch back and forth between any profiles you may have created.

Profiles can be reused across multiple FLA files or within work teams. To do this click the Import/Export Profile button (the box with the arrow) and name the profile. This will result in the creation of an XML file in your Flash Profiles directory. For PC users the path is C:\Documents and Settings\Local Settings\Application Data\ Macromedia\Flash MX 200x\(language)\Configuration\Publish Profiles. For a Mac the path is Macintosh HD\Users<username>\Library\Application Support\Macromedia\Flash MX 200x\<language>\Configuration\Publish Profiles. After the profile has been exported, you can use it in other FLA files by opening the Publish Settings iand importing the profile by clicking the Import/Export profile button and selecting the profile you have saved.

Using the Publish Settings to save a SWF to the folder that will ultimately be uploaded to your web server is also a great way to test the project’s functionality. For example if the project uses files that will be loaded into the SWF when the movie plays, the odds are really good that if it works when tested, it will also work when uploaded or placed into an HTML page.

  1. Click the Publish button and then OK to close the Publish Settings dialog box. Save the file.The SWF and the HTML files that you specified in the Publish Settings dialog box will be created.

If you use a graphical HTML editor - Dreamweaver or GoLive- it isn’t necessary to create an HTML document in the Publish Settings. A SWF file, when inserted into a page created by these apps, will also create the <object> and <embed> tags needed to display the SWF in a browser.

Adding Flash Player Version Detection

It is not uncommon for a user to either not have the Flash plug in installed or to have an earlier version of the Flash Player plug in installed on his or computer. If the plug in is not installed, most browsers will notify the user and either go to the Macromedia Flash Player install page or display a link so the user can download the plug in. The information used for the download is found in the <object> and <embed> tags created for your SWF in the HTML page.
If the wrong version is detected, the content will display but will not function correctly. For example, a file created using ActionScript 2.0 will play in the Flash Player 7 but will lose functionality in Player versions earlier than 7.

To ensure the user has the correct version of the player, you can have Flash add the code that checks for a specific version of the Player. If a user is found, by the browser, not to have the correct Player version, he or she will be prompted to update the Player.

In this exercise, you will add version detection to your SWF.

  1. Open the file you have created in this chapter.
  2. Select File>Publish Settings. When the Publish Settings open click the HTML tab, select Detect Flash Version and click the Settings button.

  1. When the Version Detection Settings dialog box opens examine the settings and click OK.


When you publish the FLA with these default settings a group of files is created that, together, check and make sure the user has Flash Player 7.0.0 , or earlier. The following files will be created when you publish your file:

You can change the Version Detection settings to earlier versions of the Flash Player and Actionscript.

  1. Click the Flash Tab in the Publish Settings dialog box to open the Flash settings.
  2. Select the version of the Player to be used from the Version pop down menu.

Your choices range from the current version of the Player, Flash Player 8, to Flash Lite 1.1 which is used primarily in devices such as cell phones and PDAs.

6. Select the version of ActionScript- Versions 1 to 2- to be used.

Keep in mind that Actionscript 2.0 will only work in Flash Player 7 . Flash Player 6 and lower, including the Flash Lite Players, only use Actionscript 1.0.

photo Tom Green
Tom Green

Who is tom green?

Teacher, author, raconteur. Here's a run down of what I have been up to over the past few years. My Bio.

Classes

Class Project 1