Okay, so Flash Player 10 is currently in beta, and there is one feature in particular which could cause a whole lot of trouble for everyone. The kicker is, the same feature could be used for several awesome things. The feature I refer to is of course the FileReference object. First a little background info for those not versed in the ways of AS3:
FileReference is primarily used for browsing a local hard disk, allowing the user to select a file, and then uploading that file to the server. In Flash Player 9, this object will not reveal the actual filepath to that file, so the player can only upload that file to a server but do no local modification (unless this is an Air app, which is another story). To do this (FP 9), you simply invoke FileReference.browse() from wherever you want and it will summon the browse window. Many flash uploaders such as SWFupload use javascript to call Actionscript code via ExternalInterface to invoke this method. Here is the problem: In Flash Player 10 FileReference.browse() has to be invoked while there is some kind of user-interaction event on the stack, such as MouseEvent. This causes problems with SWFupload for example, because it can no longer summon the browse window without a click from the user inside of a SWF. So, Adobe is about to break the internet, and possibly end the SWFupload project in the process.
Here’s the other thing: Adobe is now allowing Flash Player 10 to access the location of a file browsed to by the FileReference object to be accessed. Which means that you can locally manipulate the file before upload. For an image uploading application, this means you can do all sorts of local modifications, such as resizing, compressing, editing, etc. prior to uploading it to the server. This pushes the brunt of the load to the client-side application, and thus less bandwidth to the server, and no post-processing (assuming your SWF handles everything you need client-side).
So, I suppose this is both great and terrible. Adobe is getting ready to give us awesome control over local files, but it is also going to ruin several Flash-JS hybrid uploaders in the process.
What’s everyone’s take?
References:
http://www.bit-101.com/blog/?p=1382
http://theflashblog.com/?p=423
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=675&threadid=1362693&enterthread=y


Send Message
Add Friend