If you don't mean 100% by 100%, then what exactly do you mean?
rlragona - 27 Apr 2004 04:05 GMT
I suppose you could embed your flash in html, which I assume you are, and use
the availWidth code, or something of the like, but 100% does relate to the
viewer's computer. If you used availWidth for the main page in conjunction with
a % (whether it be 100% or 5% or anything inbetween) it should do the trick for
you.
Not sure exactly what you mean, i'm assuming you would like the browser
window to open full screen, then you would do this in HTML before the flash
movie is embeded at 100%
If you use style sheets you can set the browser to open at 100% of screen
size.
You can achieve this in IE here...
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/s
upport/kb/articles/Q287/1/71.asp&NoWebContent=1
heres a sample of code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script language="JavaScript">
window.onload = maxWindow;
function maxWindow()
{
window.moveTo(0,0);
if (document.all)
{
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById)
{
if
(top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.ava
ilWidth)
{
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
}
</script>
</head>
<BODY topmargin="0" leftmargin="0" marginwidth="0" marginheight="0"
bgcolor="#000000">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca
b#version=6,0,29,0" width="100%" height="100%">
<param name="movie" value="your flash movie.swf">
<param name=quality value=high>
<embed src="Main%20Page.swf" quality=high
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_
Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100%"
height="100%"></embed>
</object>
</body>
</html>
// just replace "your flash movie.swf" with the reletive path and name of
the movie file.
> I'm wondering if anyone knows how to make it so when someone goes to your site
> that it will automaticly resize itsself to the resolution of the viewers
> computer. (Not talking bout 100% by 100%) any answers are deeply appreciated.
> Not sure if it's possible though....
privatenews.microsoft.com - 27 Apr 2004 11:24 GMT
NB...
also replace Main%20Page.swf with your values.
> Not sure exactly what you mean, i'm assuming you would like the browser
> window to open full screen, then you would do this in HTML before the flash
[quoted text clipped - 4 lines]
>
> You can achieve this in IE here...
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/s
upport/kb/articles/Q287/1/71.asp&NoWebContent=1
> heres a sample of code:
>
[quoted text clipped - 16 lines]
> {
> if
(top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.ava
> ilWidth)
> {
[quoted text clipped - 10 lines]
> bgcolor="#000000">
> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca
> b#version=6,0,29,0" width="100%" height="100%">
> <param name="movie" value="your flash movie.swf">
> <param name=quality value=high>
> <embed src="Main%20Page.swf" quality=high
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_
> Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100%"
> height="100%"></embed>
[quoted text clipped - 11 lines]
> appreciated.
> > Not sure if it's possible though....
<SCRIPT LANGUAGE="Javascript">
<!--
// window_size_table and screen_size_table - These two arrays provide a
// translation between screen size and desired window size. For instance,
// if the screen is 800x600 and the desired window size is 720x405, the
// first two elements in screen_size_table should be 800 and 600 while the
// first two elements in window_size_table should be 720 and 405. There
// can be as many sizes as needed, as long as the numbers are given in
// pairs.
var screen_size_table = new Array(800, 600,
1024, 768,
1152, 864,
1280, 1024);
var window_size_table = new Array(720, 405,
960, 540,
1088, 612,
1200, 675);
// default_width_percent - This setting is only used if the screen size cannot
// be matched in screen_size_table. This is the percent of the screen width
// that the popped-up window should occupy, expressed as a whole number. For
// example, if the popped-up window should be 83% as wide as the screen, set
// default_width_percent to 83. NOTE: Proportionality is YOUR problem.
var default_width_percent = 75;
// default_height_percent - This setting is only used if the screen size cannot
// be matched in screen_size_table. This is the percent of the screen height
// that the popped-up window should occupy, expressed as a whole number. For
// example, if the popped-up window should be 34% as tall as the screen, set
// default_height_percent to 34. NOTE: Proportionality is YOUR problem.
var default_height_percent = 75;
// target_html_page - The URL that the popped-up window should contain. This
// may be relative. NOTE: This page must be on the same site as the current
// page or the window.moveTo() command will cause a Javascript error in
// Internet Explorer.
var target_html_page = "index2.html";
// target_window_name - The name of the popped-up window. This isn't
// important unless the popped-up window needs to be further manipulated
// with Javascript.
var target_window_name = "lookandfeel";
// =====================================================================
// DO NOT CHANGE ANYTHING BELOW THIS LINE.
// =====================================================================
function open_window()
{
var i;
var window_width;
var window_height;
var window_top;
var window_left;
if (window.screen.availHeight)
{
window_height = window.screen.availHeight * (default_height_percent / 100);
window_width = window.screen.availWidth * (default_width_percent / 100);
}
for (i = 0; i < screen_size_table.length; i += 2)
if ((screen_size_table[i] == window.screen.width) &&
(screen_size_table[i + 1] == window.screen.height))
{
window_width = window_size_table[i];
window_height = window_size_table[i + 1];
break;
}
if (window.screen.availHeight && (window.screen.availTop == 0))
{
window_top = ((window.screen.availHeight / 2) + window.screen.availTop) - (window_height / 2);
window_left = ((window.screen.availWidth / 2) + window.screen.availLeft) - (window_width / 2);
}
else if (window.screen.availHeight)
{
window_top = (window.screen.availHeight / 2) - (window_height / 2);
window_left = (window.screen.availWidth / 2) - (window_width / 2);
}
else
{
window_top = 0;
window_left = 0;
}
window.open(target_html_page, target_window_name, "screenX=" + window_left + ",screenY=" + window_top + ",height=" + window_height + ",width=" + window_width + ",hotkeys=no,directories=no,menubar=no,location=no,personalbar=no,resizable=no,scrollbars=no,status=no,titlebar=no,toolbar=no").moveTo(window_left, window_top);
return(false);
}
//-->
</SCRIPT>

Signature
Al Winchell
www.Amazingwebs.com
den.tigersquadron.com
Doctor Wink - 29 Apr 2004 00:47 GMT
awsome feedback, but what i mean is NOT 100% by 100% because that is 100% of
the window size, like when you make window smaller it shrinks. i wont it so if
they had 800x600, the flash size would be 800x600 and not change. is that all
what all that code does?
privatenews.microsoft.com - 29 Apr 2004 14:23 GMT
Hi,
My solution is implemented in www.whitsandbaydivers.com , try resizing the
window and then refreshing the page!
J
> awsome feedback, but what i mean is NOT 100% by 100% because that is 100% of
> the window size, like when you make window smaller it shrinks. i wont it so if
> they had 800x600, the flash size would be 800x600 and not change. is that all
> what all that code does?
privatenews.microsoft.com - 29 Apr 2004 14:27 GMT
I tell a lie, look at www.sw-iba.org.uk (scuse the scummy site lol its a
filler till they get their finger out with what they want and pay) lmao!
> Hi,
>
[quoted text clipped - 10 lines]
> all
> > what all that code does?