loading a flash into a page from a folder outside of the IIS

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

is it possible to load some how a flash into a webpage which has an embed
object
and that the flash will be outside of the IS folder?

thnaks in advance
peleg
 
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);
 
Back
Top