views:

374

answers:

6

Please save my skin.

http://clubentertainment.ie/c/art-perf/embed_example.html

The above link should load in Firefox, doesn't load in anything. Doesn't appear to throw any errors. It even validates.

It is using swfobject, all of the links appear to work.. it just isn't actually working. I would like to blame the flash object but as it is working in Firefox the error must be somewhere else.

Any ideas? Is there an alternative way to embed and still have it working?

Furthermore wmode transparency isn't allowing the html dropdown to appear on top of the flash..

Not sure what happens to the bounty - I discovered the problem. The error was definitely with the server. Moved website, changed nothing else. Works just fine. I would just like to thank every one for their help.

A: 

I'd like to clarify the question. It loads and runs a sequence of (very nice) pictures in Firefox, but fails to load in IE and others. Right?

deeeptext
Correct! Only just noticed the other browsers issue about 20 minutes ago.
JasonS
A: 

You can always try to embed flash using valid techniques in XHTML. You can find more about this here: http://latrine.dgx.cz/how-to-correctly-insert-a-flash-into-xhtml

As for swfobject, it seems it has some browser dependant issues. I'll try to figure this out later. I'll keep you posted if I come to any conclusions.

EDIT

Try to use relative paths to your swf file. It worked for me.

brozo
+2  A: 

I think it is problem with cross domain policy. Try to use relative path url instead of absolute path. You have absolute path now.

Codler
Could it be that the host is rubbish? This is hosted on my server w/ absolute urls. http://jasonstanley.co.uk/test/embed_example.html. My host linked from foreign domain.. Half works. http://clubentertainment.ie/embed_example.html
JasonS
Im not sure, I don't think so.Try link the xml-file in clubentertainment.ie/embed_example.html to to its own domain and see if it is working.
Codler
Unfortunately this is the issue, I have tried both relative urls and absolute urls on the ce website. Both load in Firefox, nothing else. Tried relative / absolute on my server. Exactly the same files and works.
JasonS
hmm, im looking in the xml-file, could debug-tag do some help? and can the licence-tag do something (for example maybe only working on certain domain)?
Codler
I just signed up to cu3er with a free account. Downloaded demo files. Uploaded them here. http://clubentertainment.ie/test/embed_example.html. No license on these files. Its so weird.
JasonS
+2  A: 

When putting the direct link to your swf it works on ie. http://clubentertainment.ie/c/art-perf/CU3ER.swf

It can be a cross-site problem. here the code used in CU3ER for demo http://getcu3er.com/features/

<script type="text/javascript"> 

                    var vars = { xml_location : '/inc/cu3er/config_features_overview.xml?v=2'};
                    var params = {  wmode:'transparent' };
                    var attributes = { id:'CU3ER', name:'CU3ER' }; // give an id to the flash object

                    swfobject.embedSWF("/CU3ER.swf", "cu3er-container", "300", "390", "9.0.45", "/js/expressInstall.swf", vars, params, attributes );

                </script> 

EDIT: by just putting your code in the body not the header I got the swf working in ie

    <body >
    <script type="text/javascript">
      // add your FlashVars
      var vars = { xml_location : 'http://clubentertainment.ie/c/art-perf/CU3ER-config.xml' };
      // add Flash embedding parameters, etc. wmode, bgcolor...
      var params = { bgcolor : '#ffffff' };
      // Flash object attributes id and name
      var attributes = { id:'CU3ER', name:'CU3ER' };
      // dynamic embed of Flash, set the location of expressInstall if needed
        swfobject.embedSWF('http://clubentertainment.ie/c/art-perf/CU3ER.swf', "CU3ER", 500, 250, "9.0.45", "http://clubentertainment.ie/c/art-perf/js/expressInstall.swf", vars, params, attributes );
      // initialize CU3ER class containing Javascript controls and events for CU3ER
      // var CU3ER = new CU3ER("CU3ER");
    </script>

  <!-- CU3ER content HTML part starts here   -->
  <div id="CU3ER">
    <noscript>
      <!-- modify this content to provide users without Flash or enabled Javascript with alternative content information -->
      <p>Click to get Flash Player<br /><a href="http://www.adobe.com/go/getflashplayer"&gt;&lt;img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
      <p>or try to enable JavaScript and reload the page
      </p>
    </noscript>
  </div>
  <!-- CU3ER content HTML part ends here   -->


</body>
Zied
Thanks, that actually works BUT that doesn't make any sense. The main site runs with Wordpress, the javascript has been in body all along and it hasn't worked until today in IE. It still doesn't run in Opera. Also, in IE, if you clear your cache and go to here. http://clubentertainment.ie/entertainment/ the flash doesn't load. Load the page again and it does. Its all a bit strange.
JasonS
+1  A: 

I see it not working in Safari 5, but working in Firefox 4. Please try to embed using the SWFObject static publishing method so that you can rule out JavaScript as a potential issue:

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
    <title>CU3ER</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript" src="/c/art-perf/js/swfobject.js"></script>
    <script type="text/javascript" src="/c/art-perf/js/CU3ER.js"></script>
    <script type="text/javascript">
        swfobject.registerObject("cu3er-container", "9.0.45", "/c/art-perf/js/expressInstall.swf");
    </script>
</head>
<body>
    <div>
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="300" height="390" id="cu3er-container" class="CU3ER">
            <param name="movie" value="/c/art-perf/CU3ER.swf" />
            <param name="wmode" value="transparent" />
            <param name="bgcolor" value="#ffffff" />
            <param name="flashvars" value="xml_location=/inc/cu3er/config_features_overview.xml?v=2" />
            <!--[if !IE]>-->
            <object type="application/x-shockwave-flash" data="/c/art-perf/CU3ER.swf" width="300" height="390" class="CU3ER">
                <param name="wmode" value="transparent" />
                <param name="bgcolor" value="#ffffff" />
                <param name="flashvars" value="xml_location=/inc/cu3er/config_features_overview.xml?v=2" />
            <!--<![endif]-->
                <a href="http://www.adobe.com/go/getflashplayer"&gt;
                    <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
                </a>
            <!--[if !IE]>-->
            </object>
            <!--<![endif]-->
        </object>
    </div>
</body>
</html>

You may need to adjust your JavaScript to deal with either the 'cu3er-container' ID or the 'CU3ER' class. In this example, SWFObject is only called in if the version of Flash is insufficient so that it can provide the express installer for rapid upgrade, otherwise this does not require JavaScript.

Tegeril
I tried the code you pasted but nothing appeared. I tried to embed it myself but failed. How do you embed the object without using swfobject?
JasonS
This is how you embed without SWFObject. You could remove the two references to SWFObject entirely and this would still work. If nothing appeared with this code, either your host is blocking a filetype, not serving a filetype with the appropriate mimetype, or the paths are incorrect. Since I'm not on your server, I cannot double check.
Tegeril
Thanks for the additional info. I will continue with this in the morning.
JasonS
A: 

The SWF is loading just fine for me in Chrome 5.0.375.125, but the slideshow isn't loading. I suspect this may have to do with differences among how different web browsers are handling Javascript errors.

I enabled script debugging for Internet Explorer (I highly recommend doing this) and opened your page, and I immediately got a Javascript error in what appears to be Flash ExternalInterface calls to Javascript functions defined in CU3ER.js. Sometimes browsers decide to stop running scripts altogether when encountering an error, and some just continue. Firefox is in the "just continue" camp. When clicking "ignore" for errors in IE, IE was able to load images but continued to cause Javascript errors.

The Javascript errors appear to be occurring because CU3ER can't find itself in the DOM. This is based on the fact that this Javascript function call is emitted:

__flash__addCallback(document.getElementById(""), "playCU3ER");

That emitted function is defined like this:

function __flash__addCallback(instance, name) {
    instance[name] = function () { 
        return eval(instance.CallFunction("<invoke name=\""+name+"\" returntype=\"javascript\">" + __flash__argumentsToXML(arguments,0) + "</invoke>"));
    }
}

The fact that document.getElementById was called with an empty string may mean that there's some missing flash variable that CU3ER requires. Check the documentation for the SWF and make sure you have what's required when embedding. Or it could be a relative vs. absolute URL issue as the others have mentioned.

Jacob