public
Description: SWFUpload with transparent overlay support for Flash 10
Homepage: http://swfupload.org
Clone URL: git://github.com/bschwartz/swfupload.git
bschwartz (author)
Thu Oct 16 20:06:12 -0700 2008
commit  b9819621fa9a61d1130d5f98dde2c17fbb339a2c
tree    8bfdddb84d31b597a692d020a7ccac8b7a2e1139
parent  39b28a637cc8808561f62de0bf0d23e693084487
name age message
file README.textile Loading commit data...
directory core/
directory samples/
README.textile

SWFUpload with Transparent Flash Overlay

Umm, SWFUpload is Broken. Why?

Flash 10’s change in security regarding the FileReference.browse broke SWFUpload. The details of the security changes are here.

My Changes

I’ve made some minor changes to the code to allow SWFUpload to work with Flash 10 (and continue to work with Flash 9). I accomplish this by creating a transparent Flash overlay to sit atop an HTML element (e.g. a browse button). When the user clicks the HTML element, they’re really clicking the Flash overlay. I’ve reworked swfupload.swf so it’s one giant transparent button, and when that button is clicked it brings up the file browse dialog. After that it’s business as usual.

Usage

You’ll need to make a few changes to get this version working with what you’ve already got set up.

  1. Get the updated swfupload.swf and swfupload.js files.
  2. Create a div and position it directly over your browse button or link.
  3. Add a flash_container_id setting. This should be set to the id of the div element in step 1.

What Else?

You can check out an example of this in action in the /samples/demos/flash10 directory.

If you’re from the SWFUpload team and want some help integrating this, or if you want me to remove the code from this repository, just let me know. I’m happy to do either.