views:

15

answers:

1

I have a generalized media player web app that I wish to be able to use flash in. The client uploads the flash to a particular directory, and a webpage is produced automatically that houses that flash file. The output of this process currently looks something like this:

<OBJECT id="flashContent" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<PARAM value="always" name="allowScriptAccess" />
<PARAM value="#FFFFFF" name="bgcolor" />
<PARAM value="opaque" name="wmode" />
<PARAM value="high" name="quality" />
<PARAM value="test.swf" name="movie" />
</OBJECT>

I am trying to get the flash to display using the original canvas size (540 x 400 by default) but every time I load this in chrome I get 300 x 150 and in IE the box is square.

Any idea how to get it to render using the flash canvas size?

A: 

forget about raw embedding, use js wrapper:

http://code.google.com/p/swfobject/wiki/documentation

snippet is below:

<script type="text/javascript">

var flashvars = {};
var params = {};
var attributes = {};

swfobject.embedSWF("myContent.swf", "myContent", "540", "400", "9.0.0","expressInstall.swf", flashvars, params, attributes);

</script>
Eugene
right, so I'm actually doing something like this. The problem is I don't know the height and width of the flash I'm loading. I need to either query the flash for its size, or just let it default to the right size.
alumb
you can call via ExternalInterface the swf object and update the sizes after in js
Eugene