We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

mochigames auto re size swf - Mochi Games for Oxwall | Forum

tammy harris
tammy harris Mar 9 '14
i have been trying to make the swf games auto re size to fix different screens sizes 

now the best i can come up with is to put this in custom games embed 
re sizes the swf but breaks some of the page ie widgets dont show up comments. invite friends to play  

replace the links to your swf file, i know is not a movie but remove the movie values seams to break the code, and i get 500 error on save but still saves it and works   

<style type="text/css" media="screen">

#flashPanel { width:100%; height:100%; }

</style>

<div id="flashPanel">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100%" height="100%" id="test" align="middle">
<param name="movie" value=" {YOURSWFFILE.swf} " />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="transparent" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data=" {YOURSWFFILE.swf} " width="100%" height="100%">
<param name="movie" value=" {YOURSWFFILE.swf} " />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="transparent" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflash">
<img src="http://www.adobe.com/images/shared/d...ash_player.gif" alt="Get Adobe Flash player" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>

The Forum post is edited by tammy harris Mar 9 '14
tammy harris
tammy harris Mar 9 '14
the best i can come up with that works in every browser and screen sizes is this 

  <style type="text/css" media="screen">

html, body {height:100%;}

#flashcontent { width:100%; height: 100%; }

</style>


<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%" align= "middle">

        <param name="SRC" value="game name.swf">

        <param name="wmode" value="transparent" />

        <param name="scale" value="showall" />

        <param name="BGCOLOR" value= />

  <embed src="yourswfgameurl" width="100%" height="700"

                         align="middle" scale="noborder" wmode="transparent" bgcolor="transparent"></embed>


                </object>

Den Team
Den Mar 12 '14
Topic was moved from General Chat.
You do not have permission to reply this topic