FILEREFERENCE BUG IN FLASH PLAYER 9 FOR MAC OSTUESDAY, MARCH 13 2007 @ 03:52 PMWe found this one at work last week while doing some test for an applications that requires tracking of user uploads. On Flash Player 9 for the Mac, even though tracking progress of the upload went smoothly, the "complete" event failed to trigger every time. Apparently this one was around on Flash Player 8 as well, but the only suggested solution we found, to return an empty string, did not work for Flash Player 9.
We realized the script handling the upload needs to actually output something for the "complete" event to trigger on the Flash Player 9 on the Mac, if even a blank space. However, I decided that if we are going to return something, it'd better be something we can actually use. In addition to the "uploadComplete" event, the FileReference class has an "uploadCompleteData" event, which can be used to capture the response sent by the script, once the file has been uploaded (or not, depends on your goals). So, here is a simple example of how that may be accomplished with PHP: the following script handles a file upload and returns a string containing the current session id. upload.php <?php
The next AS3 code uses the previous PHP script to save a file to the server. Once the transaction is completed, it will print the value of the sessionID variable to the Output panel. UploadTest.as
Archived under: PHP, Flash, ActionScript 3.0. | Permalink | google | del.icio.us | digg ![]() OBINNAMARCH 19 2007 @ 06:00 AMI have also experienced the same problem on flexbuilder2 with flash player 9 on windows xp(sp2). I am running through exercices in the book Adobe Flex2 - Training from the source and in Lesson 4 it is neccessary to add functionality bto a browse button and the following code is mandated(and it is this that is flagged for the error:
unless the element filereference is something the foregoing code has mistakenly not declared, I wonder if this is the same thing you encountered on your Mac? OBINNAMARCH 19 2007 @ 06:02 AM(1 minute later)Sorry I complained too soon. 'filereference' is an object which was written by the book mistakenly as an id. It should read 'FileReference' to compile.
JOPIRUIZENAPRIL 24 2007 @ 03:18 AMVery nice,sooo informative!!! I wonder why they didn't include the uploadCompleteData Event on their documentation
|
LANGUAGESARTICLES
BOOK REVIEWSSYNDICATIONFLASH
FLASH (ESPA�OL)
ADOBE
AGGREGATORS
USER GROUPS |
|


