This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Flash Site Design > March 2004 > Full Screen Java Script Help





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Full Screen Java Script Help
ath63

2004-03-30, 9:07 pm

[L=Text]http://www.actionscript.org/tutorials/intermediate/launch_full_screen/in
dex.shtml[/L]

I'm using the above tutorial (script attached) but was wondering how to a)
keep the browser "minimize" and "close" button open as in
http://www.cbcradio3.com/issues/2004_02_20/index.cfm and b) how to center my
..swf file in the center of the screen. As you can see, this code calculates
screeen resolution.

If anyone knows how to edit this, please show me exactly where to put the
code...novice at work!

Thanks in advance

<html><head>

<script language="JAVASCRIPT">
<!--


function detectVersion()
{
version = parseInt(navigator.appVersion);
return version;
}

function detectOS()
{
if(navigator.userAgent.indexOf('Win') == -1) {
OS = 'Macintosh';
} else {
OS = 'Windows';
}
return OS;
}

function detectBrowser()
{
if(navigator.appName.indexOf('Netscape') == -1) {
browser = 'IE';
} else {
browser = 'Netscape';
}
return browser;
}

function FullScreen(){

var adjWidth;
var adjHeight;

if((detectOS() == 'Macintosh') && (detectBrowser() == 'Netscape')) {
adjWidth = 20;
adjHeight = 35;
}
if((detectOS() == 'Macintosh') && (detectBrowser() == 'IE')) {
adjWidth = 20;
adjHeight = 35;
winOptions = 'fullscreen=yes';
}
if((detectOS() == 'Windows') && (detectBrowser() == 'Netscape')) {
adjWidth = 30;
adjHeight = 30;
}
if(detectVersion() < 4) {
self.location.href = 'oldbrowser.html';
} else {
var winWidth = screen.availWidth - adjWidth;
var winHeight = screen.availHeight - adjHeight;
var winSize = 'width=' + winWidth + ',height=' + winHeight;
var thewindow = window.open('fd.html', 'WindowName', winSize);
thewindow.moveTo(0,0);
}
}

function MakeItSo(){
if((detectOS() == 'Windows') && (detectBrowser() == 'IE')) {
window.open('fd.html','windowname','fullscreen=yes');
} else {
onload=FullScreen();
}
}
// -->



</script>

<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#000000"scroll='no'>>

<div align="center">
<table width="900" border="0" cellpadding="0" cellspacing="0"
bgcolor="#000000">
<!--DWLayoutTable-->
<tr>
<td width="900" height="660" valign="top"><object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve
rsion=6,0,29,0" width="900" height="660">
<param name="movie" value="FD.swf">
<param name=quality value=high>
<embed src="FD.swf" quality=high
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Vers
ion=ShockwaveFlash" type="application/x-shockwave-flash" width="900"
height="660"></embed>
</object></td>
</tr>
</table>
</div>
</body>
</html>

nardove

2004-03-30, 9:09 pm

to center the swf object

i use this


<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="middle">
****HERE THE FLASH OBJECT****
</td>
</tr>
</table>

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews