Flash 8 Image Uploader
Introduction
Flash 8 has arrived on the scene with a rich array of long-awaited additions.
In this article we will be covering one of them – the File Upload feature.
We won’t be spending much of our time on theory, which you can learn by going through Flash Help.
Instead we will focus on the practical application by building a full-featured image uploader.
Features of the application include:
- Upload list management: adding and remove collections of items in a datagrid with all the file relevant information.
- Limit not only file types but also the collection’s total file size – a user will not be able to start uploading if it exceeds the limit. Once the list is compiled the user will click the Upload button to initiate the procedure.
- During the procedure the user will be able to monitor the progress (represented by the progress bar). The user will also be notified about the upload status and errors:
A one line of PHP code will handle the upload on the back end.
![](downloads/images/screenshot_3.jpg)
Alex July is a Vancouver-based (Canada, British Columbia) Web Developer/ Graphic Artist who has an extensive experience in both creative realms.
He is also a host of Linecraft.com where he is showcasing his skills and sharing experience with the developers community. For the past 3 years Alex has been focusing on the development of Rich Internet Applications using Macromedia Flash technology.
When away from the computer Alex is practicing Martial Arts, playing guitar and enjoying time with his wonderful family.
See All Postings From Alex July >>
Reviews
Bugs
the "Upload compelete" detect code have some bug.
The code is : if((lastFile==f.name)
but flash is upload the file "async", so, the upload list:
file1, file2, file3, file4
maybe upload with this order: file3 > file1 > file4 >file2
So, If we use this flash to upload file, maybe just upload 1 file
and got an "Upload Compelete" dialog, then keep upload other file..
Thanks
Hi Frank Beverdam,
I got the source, everything works great now! Sorry about the harsh words before, but i've spend 2 days hammiering out code trying to find the a flash uploader that works. Yours is actual the best!!
Thanks
addFiles not as secure as it sounds
The tutorial says:
"Notice that you can't select files of other types. Now, is this cool or what?! Try to pull this off in HTML without extensive parsing by the server-side script!"
This is not completely accurate. Simply type a * into the File Name box in the browse dialogue and press enter. Now you can see...AND select any file. Keep this in mind when you write your server-side code. You still want to parse these files to at least check types.
Source files doesn't work
Hello people from DMXZone.
I have just downloaded the source code just to test before write it on my own, but when tryied to upload some JPGs I got this error: undefinedSecurity error occured while uploading undefined. Canyou please tell me about that? I need to see it in action before try to write following your instructions!
Thanks a lot!
Ved
See all 10 Reviews You must me logged in to write a review.