Accessibility

Table of Contents

Deconstructing the ActionScript 3.0 Flash video gallery application

Overview of the application and top-level files

The first step in understanding the application structure is to study the example source files. In broad strokes, there are four types of application files:

  • A SWF file implements the gallery movie and displays the physical assets.
  • ActionScript 3 files supply logic to the SWF at compile time.
  • An XML file supplies external data and settings to the SWF.
  • Videos are stored in separate FLV files that supply video content to the SWF.

Notice that the SWF file (FlashVideoGallery.swf in the case of the gallery) is the center point for loading external logic, settings, and content. It's common practice in application development to split the content from the application logic and the display view.

Next, take a look at the top-level of the source files and identify the application's building blocks. To view the top-level files:

  1. Download the Flash video gallery source files if you haven't already done so. You can download them from the Requirements section of this tutorial.
  2. Open the as3_flash_video_gallery folder to view the top-level files. The folder contains three subfolders and FLA, HTML, SWF, and XML files (see Figure 1).

    Folder containing the top-level files for the Flash video gallery application

    Figure 1. Folder containing the top-level files for the Flash video gallery application

The first thing to do here, at least mentally, is to separate the source files for the SWF from the overall file structure. (These files are mixed together in Figure 1.)

Here are the application files and folders that live in the top-level directory:

  • thumbnails: Folder that contains the separate thumbnail FLV files (if using the external file method)
  • video: Folder that contains separate video files, each stored in FLV format
  • FlashVideoGallery.html: HTML file that launches the gallery; the web page
  • FlashVideoGallery.swf: SWF gallery movie
  • Settings.xml: XML file that contains the user-defined settings for the application
  • Settings_streaming.xml: Alternate XML file showing a sample of streaming detail video

Note: The preceding files and folders are the application files that make up the video gallery on the website. These files will be uploaded to your server, while the source files will not.

Source files:

  • fvg: Folder containing the ActionScript 3 code package
  • FlashVideoGallery.fla: Editable master file for FlashVideoGallery.swf

Take a moment to familiarize yourself with the sample files. By understanding roughly what each of the files does, you'll be able to move much more quickly through your exploration of the application.