Daniel Insley

This is my personal blog. I enjoy mountain biking, gaming, music, and playing around with new technology. I currently work for Viviti.

All blog posts from October 2008

SWFUpload and Flash 10

Posted on October 20, 2008 at 09:39AM

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
Displaying 1 post


powered by viviti

danielinsley.com