moshem
asked on
SWFObject Slowdown ?
Hi,
I have this code in my HTML:
<object classid="clsid:d27cdb6e-ae 6d-11cf-96 b8-4445535 40000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="100%" height="100%" id="fullscreen_ex_8" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="g3.swf" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<param name="bgcolor" value="#000000" />
<embed src="g3.swf" wmode="gpu" quality="high" scale="noscale" bgcolor="#000000" width="100%" height="100%" name="fullscreen_ex_8" align="middle" allowScriptAccess="sameDom ain" type="application/x-shockw ave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
I converted it to use with SWFOBJECT:
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject(g3.swf', 'g3', '100%', '100%', '8', '#000000');
so.useExpressInstall('swfo bject/expr essinstall .swf');
so.addParam('menu', 'false');
so.addParam('scale', 'noscale');
so.addParam('wmode', 'gpu');
so.addParam('quality', 'high');
so.addParam('allowScriptAc cess', 'sameDomain');
so.write('content');
// ]]>
</script>
both work, but there is a significant performance lose with the swfobject version, somehow it is passing some obscure parameters to flash player that cause things to degrade.
my SWF has a lot of screen movement and thus is sensitive to performance
thank you
I have this code in my HTML:
<object classid="clsid:d27cdb6e-ae
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="g3.swf" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<param name="bgcolor" value="#000000" />
<embed src="g3.swf" wmode="gpu" quality="high" scale="noscale" bgcolor="#000000" width="100%" height="100%" name="fullscreen_ex_8" align="middle" allowScriptAccess="sameDom
</object>
I converted it to use with SWFOBJECT:
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject(g3.swf', 'g3', '100%', '100%', '8', '#000000');
so.useExpressInstall('swfo
so.addParam('menu', 'false');
so.addParam('scale', 'noscale');
so.addParam('wmode', 'gpu');
so.addParam('quality', 'high');
so.addParam('allowScriptAc
so.write('content');
// ]]>
</script>
both work, but there is a significant performance lose with the swfobject version, somehow it is passing some obscure parameters to flash player that cause things to degrade.
my SWF has a lot of screen movement and thus is sensitive to performance
thank you
ASKER
I need to put it in the object too ?
but it works much faster with the object version, and the swfobject version has the wmode parameter...
but it works much faster with the object version, and the swfobject version has the wmode parameter...
There are 3 wmode values : Window, Opaque and Transparent.
In your code you are using a "gpu" value, which is not valid.
In your code you are using a "gpu" value, which is not valid.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you!
I didn't know, thanks bugada.
Anyway I don't think it's related with your problem.
What i can see is that in your OBJECT there isn't the wmode parameter, whil in your EMBED or jscript is there.
May be you're testing you app in IE that uses the OBJECT...