Using the ProgressBar with a file download in Flex
Line Break
Author: Arjan (34 Articles) - Author Website
Arjan is a SAP Consultant specialized in ABAP and Front End development techniques like Web Dynpro, Adobe Interactive Forms, Flex and AIR. In his free time he likes to create examples for Flex-Blog and other applications using Flex, AIR and PHP. Other hobbies are movies and music. He is also the co-owner of Flex-Blog.com.
So sometimes you’ll have time consuming procedures in your Flex application. Flex provides a nice moving clock thingy to let the user know that it’s doing something, but it doesn’t give the user any information about the progress.
Fortunately, Adobe provided the ProgressBar with Flex. To see how you can use the progressbar in combination with a file download from the server, see the following example.
The example (use right mouse click -> view source to view the complete source code)
To test the application, click the download link, save the jpeg file somewhere on your system (e.g. your desktop). The ProgressBar will appear and show you the percentage of the download. The ProgressBar will disappear again when the download is ready.
To view the source, right click the application and choose view source.
Related posts:
- Progressbar in Datagrid Example
- Save Data to File System with AIR in Flex 4
- Remove Folder and File icons from Flex Tree
Comments
6 Responses to “Using the ProgressBar with a file download in Flex”


Thanks for the example…
Thanks for the example Arjan!
Can you do this inside of a data grid?
Hi Jack,
Sure this is possible. Please check our post: ProgressBar inside DataGrid.
Cheers,
Roelof
Thank a you. It was most informative. great job!
If you click to download and then cancel instead of downloading,the downloading frame doesnt vanish.It just stays stuck on your wallpaper.
Try it and see