Click a link to download a .SWF file.

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.
 
G

Guest

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);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top