File Types

 < Day Day Up > 

Clearly, the most common use for Flash is to create interactive animations for the Web. Sifting through all the different file types involved can be a little confusing. At a minimum, you need to understand three types: source (.fla) files, exported (.swf) files, and or Hypertext Markup Language (HTML; .htm or .html) files.

Source (.fla) Files

One of the two main file types in Flash is the source Flash movie that you save while working. It uses the file extension .fla (often pronounced "fla"). You can open and edit any .fla file, provided that you own Flash. This is your source file. With the .fla file, you can always restore the other file types but nothing can restore a .fla file (except, maybe, doing all the work over again).

When sharing files with other workers who need to edit the source file, you share the .fla file. Anyone who has Flash Basic 8 or Flash Professional 8 (for either Mac or Windows) can open and edit the .fla file you create. However, you can't put .fla files into a web page for people to view they're just files that contain your source content.

By the Way: Saving as MX2004

You can actually save a .fla to share with a co-worker who only has Flash MX 2004. When you select File, Save As you need to select "Flash MX 2004 Document" from the "Save as type" drop-down. Flash will strip out any features your file uses that are only available in Flash 8 (and warn you too). This feature is great during the transition when people upgrade.


Exported (.swf) Files

When you're finished editing a source file and ready to distribute your creation, you simply export a .swf (pronounced "swif") Flash Player file. A .swf file can be viewed by anyone who has an Internet browser and the Flash Player plug-in. The audience can't edit the .swf they can only watch it.

The process for creating a new .swf file is simple. You open a .fla file, select File, Export Movie, and then specify the name and file location for the .swf file in the Export Movie dialog box. Although more details are involved, the important point to understand is that exporting involves creating a new file (the .swf file), but the .fla file remains untouched. It's similar to using Save As or Save a Copy As in some other software programs. Whatever you do, you should always keep a copy of your .fla file. You can always create more .swf files from it or make edits and then create more .swf files.

Watch Out!: Beware of Fonts

There's one last thing you need to understand now, which applies if you work in a team environment or otherwise plan to exchange .fla files among different machines: Any .fla file you work on will open fine on any machine that has Flash installed. On a Macintosh, you might need to open Flash and then select File, Open, and on a Windows PC, you might need to make sure that the file is named with the extension .fla.

However, there's one minor catch: The font choice for any text in the .fla file must be present on the machine that is attempting to create the .swf file. It's not that you can't share a file if one person's machine is missing a particular font. Rather, that person cannot edit the text and can't create a .swf file. You can actually select a substitute font. Any time you open a .fla file that contains fonts that you don't have installed, you are given the chance to map fonts. That is, you can select what alternative font to use. You can easily avoid this situation by properly installing fonts on everyone's machine or by simply creating the .swf file on the appropriate machine.


HTML Files That Host the .swf File

If you have any experience creating HTML, the basic process of putting .swf files in a web page should be simple. If you have no HTML experience, it won't hurt to learn a little HTML, but you really don't have to. Remember that when you "visit" a web page, you're not really "going" anywhere. Rather, your browser software downloads a text file (with either an .htm or .html file extension). This HTML file contains not only the words you see on the web page, but additional instructions as well, including the font style and size.

In addition, the HTML file contains details about any of the pictures that are supposed to be seen on the web page details such as the image file's name and from where it should download so that you can see it. Putting a Flash Player (.swf) file in a web page is almost as easy as putting a picture in a web page. A few other details (in addition to the filename of the .swf) can be included, such as the background color, whether you want the movie to loop, and other interesting settings that are unique to Flash.

To make this process even easier, Flash includes a feature called Publish (discussed in Hour 19, "Linking a Movie to the Web," and Hour 24, "Publishing a Creation"), which walks you through the steps of creating both the .swf file and the .html file. Every detail available can be specified in the Publish Settings dialog box (see Figure 1.21). You can specify parameters for each file format that you intend to distribute by using the tabs that appear (only the tabs for the file types you specify appear).

Figure 1.21. In the Publish Settings dialog box, you can decide what file formats you intend to distribute.


     < Day Day Up > 


    Sams Teach Yourself Macromedia Flash 8 in 24 Hours
    Sams Teach Yourself Macromedia Flash 8 in 24 Hours
    ISBN: 0672327546
    EAN: 2147483647
    Year: 2006
    Pages: 235

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net