CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   Flash & ActionScript (http://www.codingforums.com/forumdisplay.php?f=52)
-   -   preloader hangs at 5% when embedded in CMS (http://www.codingforums.com/showthread.php?t=230357)

howie2009 06-25-2011 11:40 AM

preloader hangs at 5% when embedded in CMS
 
Hi Guys,
I use a commercial quiz application that generates the quiz as a self contained swf i.e no xml. When I embed the swf into a template in the CMS I use i.e. Modx Revo, the preloader only loads to 5% in IE and Chrome and to 90% in Firefox. So if i navigate to http://samplesite.com/index.php?id=20 in which the swf is embeded the above happens. If I use an iframe to embed the swf it all work fine?

Strangely if i navigate to the swf directly say http://samplesite.com/flashfiles/sample.swf that same swf opens fine and the preloader works fine.


This works:
Code:

<iframe width="720" height="540" src="uploads/sample.swf" frameborder="0"></iframe>
This doesn't: (and i have tried embedding using swfobject and absolute urls also)

Code:

<script language="javascript">

function writeSwf(movie, width, height) {
  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + width + '" height="' + height + '" ID="sf" VIEWASTEXT>');
  document.write('  <param name="movie" value="' + movie + '" />');
  document.write('  <param name="quality" value="high" />');
  document.write('  <param name="wmode" value="window" />');
  document.write('  <param name="allowScriptAccess" value="always" />');
  document.write('  <param name="allowFullScreen" value="true" />');
  document.write('  <embed src="' + movie + '" quality="high" name="sf" allowScriptAccess="always" allowFullScreen="true" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '" />');
  document.write('</object>');
}
  writeSwf("uploads/sample.swf", 720, 540);
</script>

any ideas? Additional param maybe? The above embed code is what the manufacturer uses. I guess its a preloader issue as I can embed youtube videos without issue.

Thanks


All times are GMT +1. The time now is 07:53 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.