danielinsley.com
SWFUpload and Flash 10
With the recent release of Flash 10 by Adobe, a change in security regarding FileReference.browse broken SWFUpload. The details of the security changes are out lined at the following address:
http://www.adobe.com/devnet/flashplayer/articles/fplayer10_security_changes_02.html#head3
Any existing content that invokes a browse dialog box using FileReference.browse or File Reference.download outside of an event triggered by user interaction will need to be updated. The dialog box now has to be invoked directly through a button, keyboard shortcut, or another event directly initiated by the user on the flash video.
If you're using a image button for your 'File selection' link, you'll need to add the following to your SWFUpload instance settings:
button_image_url: "../images/buttons/add_files.png",
button_width: "80",
button_height: "30",
button_placeholder_id: "swfuploadContainer"
The button image should be formatted as Active, Hover, Click, and Disabled states. An example is included in the samples/buttons directory from SWFUpload trunk:

If you're just using a text link for triggering the selectFiles dialog, you can just use the following settings:
button_text: "Select files for upload",
button_placeholder_id: "swfuploadContainer"
The button_placeholder_id specified will be replaced with the flash object that is not the selectFiles link.
You'll need the latest version of SWFUpload in order to make these changes. You can checkout the latest version by issuing the following command:
svn checkout http://swfupload.googlecode.com/svn/swfupload/trunk/ swfupload
Comments
There are no comments for this post.
Add comment
About me
I'm a 23 year old Software Developer from British Columbia, Canada. I currently have the privilege of writing Ruby full time at viviti.com. I enjoy spending my time with my family, programming, watching hockey, and listening to all kinds of music!
Archive
- October 2008 (1)
- September 2008 (1)
- May 2008 (2)
- April 2008 (2)
- March 2008 (3)
