[SWFObject] Scaling to fit browser

GotoAndLearn (uk) {} doug at dougstudio.co.uk
Mon Sep 18 04:49:40 PDT 2006


Hi Geoff,

 

I have a problem which is so simple it hurts me to have to ask about it.

 

I'm putting this in my html:

 

<script type="text/javascript">

   var so = new SWFObject("flash/mydomain_root.swf", " mydomain _root",
"100%", "100%", "9", "#dddddd", false);

   so.addParam("quality", "best");

   so.addParam("menu", "false");

   so.addParam("scale", "exactfit");

   so.write("flashContent");

</script>

 

Everything works just fine except 'scale' (Firefox, Netscape etc don't
expand to the browser size). I can get the result I want by simply
publishing an html file from within Flash and it will work as expected
across all browsers but as soon as I try to do anything using swfobject the
height is displayed incorrectly.

 

This is the normal html (published from within flash):

 

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.
cab#version=8,0,0,0" width="100%" height="100%" id="mylivesession_root"
align="middle">

<param name="allowScriptAccess" value="sameDomain" />

<param name="movie" value="flash/mydomain_root.swf" /><param name="quality"
value="best" /><param name="scale" value="exactfit" /><param name="bgcolor"
value="#ffffff" /><embed src="flash/mydomain root.swf" quality="best"
scale="exactfit" bgcolor="#ffffff" width="100%" height="100%"
name="mylivesession_root" align="middle" allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" />

 

I also tried setting scaleMode from within my actionscript but it doesn't
work either. Any ideas?

 

Best regards

Doug

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.deconcept.com/pipermail/swfobject-deconcept.com/attachments/20060918/70335e52/attachment-0004.htm>


More information about the Swfobject mailing list