Archive for the ·

JavaScript

· Category...

JavaScript force minimal flash size

A simple, small script that makes sure your fullscreen flash doesn't gets too small.

make sure to copy the onresize and onload attributes in the body tag along with the script.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>My title</title>
<style type="text/css">
<!--
/* commented backslash hack \*/
html, body{height:100%;}
/* end hack */
html,body {margin:0;padding:0}

</style>

<script language="javascript" type="text/javascript">

var minHeight = 750;
var minWidth = 955;

function resizeDiv(_id){
   var elm = document.getElementById(_id);

   var pageWidth = 0, pageHeight = 0;

     if( typeof( window.innerWidth ) == 'number' ) {
       pageWidth = window.innerWidth;
       pageHeight = window.innerHeight;
     }
     else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
       //IE 6+ in 'standards compliant mode'
       pageWidth = document.documentElement.clientWidth;
       pageHeight = document.documentElement.clientHeight;
     }
     else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
       //IE 4 compatible
       pageWidth = document.body.clientWidth;
       pageHeight = document.body.clientHeight;
     }
   pageWidth < minWidth ? elm.style.width = minWidth+'px' : elm.style.width = '100%';
   pageHeight < minHeight ? elm.style.height = minHeight+'px' : elm.style.height = '100%';
}

</script>

<script type="text/javascript" src="swfobject.js" ></script>
<script type="text/javascript">
   swfobject.embedSWF("index.swf", "flashDiv", "100%", "100%", "9.0.0");

</script>
</head>

<body  bgcolor="#ffffff"  border="0" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onresize="resizeDiv('flashDiv')" onload="resizeDiv('flashDiv')">

   <div id="flashDiv"></div>

</body>
</html>

Touchée website

Created the technical release for the touchée websitem, including CMS. Touchée is a dancecompany, kung-fu school and consultancy. Design by The brewery

touchee1

touchee2

touchee3