Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • hickoryFornander 32 posts 52 karma points
    Jan 18, 2010 @ 08:10
    hickoryFornander
    0

    .swf file is blank in Umbraco media, but not in the file system.

    Hi!
    I use Umbraco v4, a Windows server 2003 and the "insert flash file"-package.

    This works fine for .swf files but when I use a .swf file with actionscript and as soon as I add the file to the media section it stops working. The browser shows blank.

    The actionscript code just redirects to another page when it is finished. The file works when I look at it through the file system so it is not corrupt and so I know that it has been uploaded to the the server. I have checked the MIME types and it is correct (application/x-shockwave-flash).

    I had the exact same problem with .flv files but that was solved with adding a MIME for it.

    Is there anything I have to think about when uploading a .swf file including actionscript to Umbraco? As I said, it works to play the .swf file in the file system on the server.

    Been on to this problem a long time now, whould be great if someone has any idea of why :(

    Thank you!

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jan 18, 2010 @ 09:38
    Sebastiaan Janssen
    0

    SWF files with actionscript seem to work fine for me, even when uploaded through the media section.

    How are you including the file in your pages? Through the GetMedia method or are you just linking straight to /media/xxx/file.swf? 

    Does it work in different browsers maybe? Can you see (using Fiddler2, or FireBug for example) that the SWF file is actually downloaded, and has the correct headers.

  • hickoryFornander 32 posts 52 karma points
    Jan 18, 2010 @ 10:34
    hickoryFornander
    0

    Hi!Thank you so much for answering!

    It is great to hear that it is supposed to work! :) At the moment I can not even view the file in the media section. 
    Just tested to start Umbraco in IE and it is the same, I can only see a blank page in the browser. I have FireBug, how can i see if it is "downloaded, and has the correct headers"?


    I am using the "insert flash file" package and the template looks like this:

    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <!--<link rel="stylesheet" type="text/css" href="/css/styling.css" /> -->
        <script type="text/javascript" src="/scripts/swfobject.js"></script>
    </head>
    <body>
    <div id="skipping"><a href="sdeer.aspx" onClick="return hideFlash()">SKIP INTRO</a></div>
    <table height="100%" width="100%">
    <tr>

    <td valign="middle" align="center">
    <umbraco:Macro SettingsNode="1386" videoid="movieOne" VideoWidth="400" VideoHeight="400" Alias="InsertFlashFile" runat="server"></umbraco:Macro>
    </td>

    </tr>
    </table>

    That works fine with other swf-files, just not when it is actionscript in it, because it seems as if the swf file is not even in Umbraco media section :S .

    / Hickory

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jan 18, 2010 @ 10:53
    Sebastiaan Janssen
    0

    Aah, I see how you insert it now, can you also show what HTML is being produced in when you go to the page itself? 

    In Firebug you can go to the "Net" tab and under that click on the "Flash" filter. If that doesn't show any files, then hold CTRL while clicking the refresh button (that way, the file is not coming out of your cache, but will be downloaded again). The headers should at least include:

    Content-Type: application/x-shockwave-flash

  • hickoryFornander 32 posts 52 karma points
    Jan 18, 2010 @ 11:42
    hickoryFornander
    0

    Hi!
    Thank you, I am learning a lot from this :)


    Been removing and inserting the file in media, and going a little bit nuts, it is just like the server does not know what to do with it.

    The FireBug says this:

    Response Headers
    Content-Length 36813
    Content-Type application/x-shockwave-flash
    Last-Modified Tue, 29 Dec 2009 18:50:47 GMT
    Accept-Ranges bytes
    Etag "664671d5b788ca1:56c"
    Server Microsoft-IIS/6.0
    X-Powered-By ASP.NET
    Date Tue, 19 Jan 2010 02:39:38 GMT
    Request Headers
    Host localhost
    User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7
    Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language en-us,en;q=0.5
    Accept-Encoding gzip,deflate
    Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive 300
    Connection keep-alive
    Referer http://localhost/sdeer-intro.aspx
    Cookie UserContext=2176b015-63ac-406a-b419-b13dea63d96d; updateCheck=1
    Pragma no-cache
    Cache-Control no-cache

    The html looks like this:

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <!--<link rel="stylesheet" type="text/css" href="/css/styling.css" /> -->
    <script type="text/javascript" src="/scripts/swfobject.js"></script>
    </head>
    <body>
    <div id="skipping"><a href="sdeer.aspx" onClick="return hideFlash()">SKIP INTRO</a></div>
    <table height="100%" width="100%">
    <tr>
    <td valign="middle" align="center">
    <div id="movieOne">
    <p><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this content.</p>
    </div><script type="text/javascript">


    var path = "/media/8220/best.swf";
    var videowidth = "400";
    var videoid = "movieOne";
    var videoheight = "400";
    var flashvars = {};
    var attributes = {};
    var params = {
    wmode: "transparent",
    allowfullscreen: "true",
    allscriptaccess: "always"
    };

    swfobject.embedSWF(path, videoid, videowidth, videoheight, "9.0.0", flashvars, params, attributes);


    </script>
    </td>

    </tr>
    </table>

    </body>
Please Sign in or register to post replies

Write your reply to:

Draft