Sanders provides a quick overview of Flash MX Professional 2004 and covers the core elements, frames and layers, and new features such as the document tab at the top of the Document window. (Macromedia Flash MX Professional 2004, by Bill Sanders, Sams, 2004, ISBN 0672326051.)
Getting to Know Flash Pro - Flash Files (Page 5 of 9 )
Before continuing, a word on the different Flash Pro files is in order. As you work with Flash Pro, not only will you generate a number of different file types, you'll also use files that Flash Pro doesn't generate. This section provides an overview of the different files you're likely to work with using Flash Pro.
FLA Files
All editable materials in Flash are saved in FLA files (pronounce it as F-L-A or flaw). These files contain objects and ActionScript that can be changed by adding, modifying, or deleting materials. After you've saved a document in an FLA file, you can open it again and make any changes you want. In developing a large and complex movie, you might want to consider saving different progressive versions of your movie so that if some portion of a later version doesn't perform correctly, you can open an earlier version where all the parts are correctly working. For instance, you might want to save Mov1.fla, Mov2.fla, and so forth as you develop a movie.
SWF Files
A SWF file (pronounce it swif) is a compiled Flash document that can be run directly from a player or on the Web from a browser with a Flash plug-in. A SWF file is created as soon as you have named an FLA file and saved it and then tested the movie. For example, if you save Mov1.fla and then test it, it automatically creates a file named Mov1.swf. When you publish a Flash document, typically you also generate a SWF file. The default publish settings include generating a SWF file.
HTML Files
Another file that may be created when you publish a movie is an HTML file. Like the SWF file, the default publish setting generates an HTML file with the same name as the saved name of the FLA file. So, if you have a document named Mov1.fla, when you publish the movie, it generates a file named Mov1.html. The HTML file contains code to embed the SWF file generated when the HTML file is created. (An HTML file is generated only if a SWF file is selected to be published at the same time.)
AS Files
You can create an AS file directly in Flash Pro by selecting ActionScript File when creating a new document. In previous versions of Flash, to create an AS file you had to either export a script from the Actions panel or create it independent of Flash using a text editor such as Microsoft's Notepad. An AS file is simply an external ActionScript 2.0 file saved in text format. However, with Flash MX Professional 2004, it automatically loads classes. (See Chapter 3 for details.) An AS file can also be loaded using the #include statement in the following format:
#include ³filename.as²
The code loaded performs in the same manner as ActionScript generated in the Actions panel, but instead of being stored in the FLA file, it's in an external text file.
FLV Files
An important file type that can now be generated with Flash MX Professional 2004 is the FLV file. The FLV file is a movie file that can be progressively downloaded, previously accessible only with Flash Communication Server. Now using Flash Pro, these files can be used in lieu of movie files that have to be entirely loaded into a Flash document or played on an external player such as QuickTime or RealPlayer. (See Chapter 10, "Adding Video and Sound," for details on generating FLV files and running them in a Flash document.)
Other Files
Flash Pro generates other types of files and can work with other files as well. You can generate ActionScript Communication (ASC) files in much the same way as AS files, simply by selecting the ActionScript Communication Files option when creating a new file. The ASC files are used to generate server-side communication ActionScript for Flash Communication Server projects. Likewise, you can use the Flash JavaScript File option to create JSFL files. Both ASC and JSDL files are beyond the scope of this book, but you should know that if generating either type of file is important for your work, you can do so from Flash Pro.
In the Publish Settings, you can create the following files in addition to SWF and HTML files:
GIF
JPEG
PNG
Windows Projector (.exe)
Macintosh Projector (.hqx)
QuickTime (.mov)
For static images, the GIF, JPEG, and PNG files provide a way to capture the current image of the movie. Static images only capture the initial position of the movie. The two projector options provide a standalone movie that can be played within a self-contained Flash player and can be useful for movies to be played from CD-ROMs. If you have the updated version of QuickTime, you can generate MOV files that can be played on computers with the QuickTime players.
A final important type of file you can work with in Flash is the MP3 file, a highly compressed audio file. Previous versions of Flash allowed MP3 files to be loaded into a Flash movie, or you could convert other file types to MP3 and play them from within the SWF file as well. However, even though highly compressed, MP3 files added considerable "weight" (increased file size) to the SWF file. With Flash Pro, you can progressively download MP3 files (much like FLV files) and not have to load them in the Flash file to play them. (See Chapter 10 for details on streaming MP3 files.)
This chapter is from Macromedia Flash MX Professional 2004, by Bill Sanders (Sams, 2004, ISBN: 0672326051). Check it out at your favorite bookstore today.