Flapshot - AIR Application Info Page

Downloads: Air Installer, Source Code

Application By: Parampal Randhawa, Sheridan College, Canada.

Flapshot is an Adobe AIR desktop application that will let you play FLV video’s from your desktop in full screen mode. In addition to playing the FLV videos you can also take the snapshots (including transparent FLV videos) and save them into “Flapshot” folder on your desktop in “.png” graphic format.

Flapshot is very easy to use application. All you have to do is drag and drop the video file on top of the player in the video (the left box) area. It will scan all the videos residing in the folder you dropped the file from and populate into the playlist. Following describes the usage of the buttons:

  • "Prev" or "Next" buttons to play previous or next video in the playlist.
  • "Full Screen" button lets you see the full screen preview of the current video being played.
  • "Flapshot It" button to take the snapshot of the video and save it on your desktop into "Flapshot" folder in ".png" format.




Desktop snapshot of the "Flapshot" application icon and "Flapshot" folder.

Classes

The main components used in the application are FLVPlayback and DataGrid and the AIR Classes of course for reading video list and saving the PNG data. On the click of "Flapshot It" button the BitmapData from FLVPlayback component is passed to a PNG encoder function, which converts the BitmapData to PNG format and eventually saves the PNG data on the hard disk.

Air Classes

This is how the AIR package list in flash looks like.

The list of AIR specific classes I used in Flapshot are:

flash.desktop.Clipboard;
flash.desktop.ClipboardFormats;
flash.desktop.ClipboardTransferMode;
flash.desktop.NativeDragManager;
flash.events.NativeDragEvent;
flash.filesystem.File;
flash.desktop.NativeApplication;
flash.filesystem.FileStream;
flash.filesystem.FileMode;

flash.desktop.Clipboard
The Clipboard class provides a container for transferring data and objects through the clipboard and through drag-and-drop operations. The operating system clipboard can be accessed through the static generalClipboard property.

flash.desktop.ClipboardFormats
Defines constants for the names of the standard data formats used with the Clipboard class.

flash.desktop.ClipboardTransferMode
Defines constants for the modes used as values of the transferMode parameter of the Clipboard.getData() method.

flash.desktop.NativeDragManager
The NativeDragManager class coordinates drag-and-drop operations. With the native drag-and-drop API, you can allow a user to drag data between an AIR application and the native operating system, between two applications, or between components within a single application.

flash.events.NativeDragEvent
Native drag events are dispatched by the interactive objects involved in a drag-and-drop operation.

flash.filesystem.File
A File object represents a path to a file or directory. This can be an existing file or directory, or it can be one that does not yet exist (for instance, it can represent the path to a file or directory that you wish to create).

flash.desktop.NativeApplication
The NativeApplication class represents this AIR application and provides application information, application-wide functions, and dispatches application-level events.

flash.filesystem.FileStream
A FileStream object is used to read and write files. Files can be opened synchronously by calling the open() method or asynchronously by calling the openAsync() method.

flash.filesystem.FileMode
The FileMode class defines string constants used in the fileMode parameter of the open() and openAsync() methods of the FileStream class. The fileMode parameter of these methods determines the capabilities available to the FileStream object once the file is opened.