As Steve suggested, I have used this technique:
Output the Flash object container as HTML using a function such as
this:
public static string GetFlashContainer(string strFilePath)
{
StringBuilder sbOutput = new StringBuilder();
sbOutput.Append("<object type='application/x-shockwave-
flash' data='" + strFilePath + ">");
sbOutput.Append(" <param name='movie' value='" +
strFilePath + "' />");
sbOutput.Append(" <param name='wmode'
value='transparent' />");
sbOutput.Append(" <img src='../images/icons/noflash.gif'
alt='No flash player detected' />");
sbOutput.Append("</object>");
return sbOutput.ToString();
}
Rather than strFilePath being a path to the Flash file, it is an aspx
page that has in its PageLoad event:
string strImagePath = [Path to where the Flash File is
kept, you can use eg a querystring parameter on the page to identify
this]
Response.ContentType = "application/x-shockwave-flash";
byte[] _imgbytes =
File.ReadAllBytes(strImagePath);
Response.AppendHeader("Content-Length",
_imgbytes.Length.ToString());
Response.Cache.SetLastModified(DateTime.Now);
Response.Cache.SetCacheability(HttpCacheability.Public);
Response.BinaryWrite(_imgbytes);