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

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
 
A

Andy

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

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

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top