Hello everyone, I have been trying to insert the snippet below into my main JavaScript code.
It doesn't want to work properly no matter where I put it? I have some large swfs that require a preloader and when I load them into my html div via my code nothing is visible until they are fully downloaded. I tried to use action script to force visibility but that didn't work so I loaded one thru the home page code below and it seems to work fine. I think the reason is the snippet, so I have been trying to implement the snippet into main code but I can't get it to work at all? Thank you for yesterday again and tank you in advance for any light you can shed on my problem. PhilBuilt. http://www.philbuilt.info Home page code: <script type="text/javascript"> swfobject.switchOffAutoHideShow(); var params = { bgcolor:"#5B5B5B" }; var attributes = { allowScriptAccess:"always", menu:"false", quality:"best" } swfobject.embedSWF("flash_files/home.swf?" + new Date().getTime(), "flashcontent", "975", "575", "9.0.0","expressInstall.swf", null, params, attributes); </script> Snippet: swfobject.switchOffAutoHideShow(); Main JavaScript code: function isObject(targetID){ var isFound = false; var el = document.getElementById(targetID); if(el && (el.nodeName === "OBJECT" || el.nodeName === "EMBED")){ isFound = true; } return isFound; } function replaceSwfWithEmptyDiv(targetID){ var el = document.getElementById(targetID); if(el){ var div = document.createElement("div"); el.parentNode.insertBefore(div, el); swfobject.removeSWF(targetID); div.setAttribute("id", targetID) } } function loadSWF(url, targetID){ if (swfobject.hasFlashPlayerVersion("9")) { var attributes = { data:url + "?" + new Date().getTime(), width:"975", height:"575", type:"application/x-shockwave-flash" }; var params = { menu:"false", //enablejs:"true", quality:"best", base:".", bgcolor:"#5B5B5B", allowNetworking:"all", //wmode:"transparent", allowScriptAccess:"always" //allowfullscreen:"false" }; var obj = swfobject.createSWF(attributes, params, targetID) } } -- You received this message because you are subscribed to the Google Groups "SWFObject" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/swfobject?hl=en.
