Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > loading a flash into a page from a folder outside of the IIS

Reply
Thread Tools

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

 
 
=?Utf-8?B?cGVsZWdrMQ==?=
Guest
Posts: n/a
 
      08-30-2007
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
 
Reply With Quote
 
 
 
 
Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
Guest
Posts: n/a
 
      08-30-2007
Yes, as long as the flash file's location is accessible to the user.
If it is not accessible to the user you may need a page or handler to grab
the file from the private location and output it as needed, perhaps using
Response.WriteFile.

Here's more info:
http://SteveOrr.net/articles/Flasher.aspx
http://msdn2.microsoft.com/en-us/lib...30(vs.71).aspx

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net



"pelegk1" <> wrote in message
news:14BFCE62-C87F-46E2-B6EC-...
> 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


 
Reply With Quote
 
 
 
 
Andy
Guest
Posts: n/a
 
      08-30-2007
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.Pu blic);
Response.BinaryWrite(_imgbytes);

 
Reply With Quote
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      08-30-2007
"Andy" <> wrote in message
news: ups.com...

> As Steve suggested, I have used this technique:


I use this: http://www.wimpyplayer.com/


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Diff. the JRE INSIDE the jdk folder and JRE OUTSIDE the JDK folder? Jochen Brenzlinger Java 5 09-02-2011 08:48 PM
help with pix inside->outside + dmz->outside + inside->outside->dmz Jack Cisco 0 09-19-2007 01:57 AM
Loading flash content into a web page Tor Inge Rislaa ASP .Net 4 04-19-2007 08:44 AM
nat from outside to outside dt1649651@yahoo.com Cisco 1 08-21-2005 04:26 PM
Deployment: bin folder outside root folder? Jon Maz ASP .Net 12 07-01-2004 09:01 PM



Advertisments