tags:

views:

981

answers:

1

Hi

I display flash objects by pointing the Movie and Src params, as well as the embed-tag's src attribute to an HttpHandler with a filename as QueryString.

<OBJECT codeBase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7.0.19.0" classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width="468" height="60">
  <PARAM NAME="Movie" VALUE="/image.ashx?serverencoded=true&amp;path=%2fapp_data%2fconfiguration%2faccount%2f21658260-9a62-425b-abb7-496ffde599a5%2fcreatives%2fswf_test_bannerA(4).swf">
  <PARAM NAME="Src" VALUE="/image.ashx?serverencoded=true&amp;path=%2fapp_data%2fconfiguration%2faccount%2f21658260-9a62-425b-abb7-496ffde599a5%2fcreatives%2fswf_test_bannerA(4).swf">
  <embed src="/image.ashx?serverencoded=true&path=%2fapp_data%2fconfiguration%2faccount%2f21658260-9a62-425b-abb7-496ffde599a5%2fcreatives%2fswf_test_bannerA(4).swf&rnd=34d5" quality="high" wmode="opaque" pluginspage="https://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="468" height="60">
  </embed>
</OBJECT>

It works perfectly with Falsh 9 player installed. After installing Flash 10, a white background is displayed, and when I right click the object, 'Movie not loaded' is displayed as a disabled menu-item in the Flash context menu.

If I point the Movie and Src params to an actual swf file, it works!

Remember: Running code works with Flash 9 but not 10. No changes were made to the code at all...

+3  A: 

Answering my own question:

I was setting the content-disposition HTTP Header like this:

HTTP/1.1 200 OK
Content-Disposition: attachment; filename=checkimage.jpg
Content-Length: 76127
Content-Type: image/JPEG

And since Flash 10, they ignore SWF files served with the attachment keyword, so I changed the header to this:

HTTP/1.1 200 OK
Content-Disposition: filename=checkimage.jpg
Content-Length: 76127
Content-Type: image/JPEG

And now it works. Take a look at this: http://www.adobe.com/devnet/flashplayer/articles/fplayer10_security_changes_02.html#head32

MartinHN