Instead of just providing a Flex component or customizable interface to use in projects, this Actionscript 3 class allows you to implement file downloading in any of your Adobe Air desktop AND Air for Android mobile applications.
This Actionscript 3 class works in Adobe Air 2.0+ for desktop and Adobe Air 2.6 for Android devices.
This class allows you to use a default folder path or set the folder path to where you want the file downloaded.
Custom events are displatched for Progress, Complete, and Errors. The progress event displays the current bytes downloaded and the total bytes downloaded so that you can use this information to update a ProgressBar on the desktop application. For Android apps, there is a bindable isDownloading property that can be bound to the visible property of the new BusyIndicator in Flex 4.5.
Asdoc is provided and is displayed in code completion in Flash Builder.
Two sample projects are provided. A desktop version built in Flex 4.5 and running on Air 2.6. The mobile sample is built on Flex 4.5 and running on Air 2.6. If you are running a lower version of the Flex SDK or Air on your system, you can just create a project in Flash Builder and copy and paste the code from the sample desktop application into your project.
