Force SWF to Download (rather that open in browser)?


Is there a way to force an SWF file, linked from HTML, to download (and therefore open in Adobe Player directly) rather than open embedded in the webbrower?

For example;
<a href=“file.swf”>test</a>
Clicking on “test” will make a download/open prompt, and not open “file.swf” in the browser.

I’m looking at things with “application/octet-stream” but no luck so far. Was wondering if anyone here might have had a solution.


And just for some further info, and maybe alternate suggestions, the reason I want to do this is because I’d like to bypass the annoying error message that appears in new versions of Flash Player, “Adobe Flash Player has stopped a potentially unsafe operation.”

These files are actually on a CD, and the SWF is an interactive brochure. For that interactive brochure to work, it loads external, supporting files (all also on the CD) but doing so is interpreted as a security risk by the newer Flash Players, and hence the message.

I’ve discovered, however, that when one opens the SWF directly in Flash Player, and not through the Flash Player plugin of the browser, the error message doesn’t appear. Therefore I’d like to find some way to open the SWF that way through an HTML link.

argh! Dammit.

Seems that the MIME types idea (“application/octet-stream”) only works if the files were on a server (so I could use PHP), but that doesn’t help me as these files are going to be on a CD.

There doesn’t seem to be anyway so far, using pure HTML and Javascript, to get what I need to happen.

In HTML 5, there is a “download” attribute, but it is only supported in Chrome. How frustrating.