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

Discussion in 'ASP .Net' started by =?Utf-8?B?cGVsZWdrMQ==?=, Aug 30, 2007.

  1. 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
    =?Utf-8?B?cGVsZWdrMQ==?=, Aug 30, 2007
    #1
    1. Advertising

  2. 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/library/aa332830(vs.71).aspx

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



    "pelegk1" <> wrote in message
    news:...
    > 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
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider], Aug 30, 2007
    #2
    1. Advertising

  3. =?Utf-8?B?cGVsZWdrMQ==?=

    Andy Guest

    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);
    Andy, Aug 30, 2007
    #3
  4. Mark Rae [MVP], Aug 30, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jaap de verwant slachter
    Replies:
    0
    Views:
    1,241
    jaap de verwant slachter
    Jul 1, 2003
  2. Jon Maz
    Replies:
    12
    Views:
    4,663
    Vadim Chekan
    Jul 1, 2004
  3. Tor Inge Rislaa

    Loading flash content into a web page

    Tor Inge Rislaa, Apr 18, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    379
    Tor Inge Rislaa
    Apr 19, 2007
  4. Jochen Brenzlinger
    Replies:
    5
    Views:
    902
    Roedy Green
    Sep 2, 2011
  5. Krzysztof Poc

    outside type, outside function

    Krzysztof Poc, Feb 3, 2012, in forum: C++
    Replies:
    1
    Views:
    271
    Victor Bazarov
    Feb 7, 2012
Loading...

Share This Page