Question

I embedded a flash game on my site with Swfobject, I defined the dimension, but the game fit the container. How i can define the width (and the height) also as max width?

<!-- Game embedding -->
<script type="text/javascript">
    var attributes = {id: "gm", name: "Rebuild Chile"};
    swfobject.embedSWF("game.swf", "gm", "720", "480", "9.0", null, attributes);
</script>

<div id="gm"></div>
<!-- Game embedding -->

What id wrong?

Was it helpful?

Solution

I solved this way:

<!-- Game embedding -->
<script type="text/javascript">
    var attributes = {id: "gm", name: "Game name"};
    swfobject.embedSWF("game.swf", "gm", "720", "480", "9.0", null, attributes);
</script>

<div id="gm_container">
  <div id="gm" style="height:480; witdh=:720;">
  </div>  
</div>
<!-- Game embedding -->
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top