Click a link to download a .SWF file.

  • Thread starter Thread starter Mr.Magic
  • Start date Start date
M

Mr.Magic

I know how to load a .SWF file on a web page. But how do I make it so that I
have a link a person can click and that will cause the open/save dialog to
appear?

TIA - Jeff.
 
I know how to load a .SWF file on a web page. But how do I make it so that I
have a link a person can click and that will cause the open/save dialog to
appear?

TIA - Jeff.

try this

FileStream MyFileStream = new FileStream("filename.swf",
FileMode.Open);
long FileSize = MyFileStream.Length;
byte[] Buffer = new byte[(int)FileSize];
MyFileStream.Read(Buffer, 0, (int)MyFileStream.Length);
MyFileStream.Close();
Response.ContentType="application/x-shockwave-flash";
Response.AddHeader( "content-disposition","attachment;
filename=filename.swf");
Response.BinaryWrite(Buffer);
 
Back
Top