Click to See Complete Forum and Search --> : Only open a Full Screen intro page
brigsM
10-05-2003, 07:39 PM
Hi..
I have an intro page (flash) that I wish as the “home Page”. I’m trying to open it full screen but with out needing to open a regular browser window to execute the script that opens the full screen and loads the flash swf file.
Could someone please give me some advise… Thanks….
James L.
10-05-2003, 10:14 PM
Hey,
I THINK I understand what you are wanting to do. You want it so that when a user goes to your site the site loads into a window that is the correct size for the flash document...
as opposed to having it so it goes to a page, which opens a window of a certain size, which then contains the Flash document.
...is this right?
If this is the case, then what you need to do is place an OnLoad command in the body tag of the page containing your flash document that resizes that window.
It would look something like this:
<body onLoad="self.resizeTo(800,600);">
...where 800 is the width of the window and 600 is the height. Change these numbers to whatever you like.
I'm not certain if the onLoad code executes BEFORE the page loads, or after, but either way the end result is the window will be the size you want it, with the Flash displayed in it. No second window required.
I hope this helps.
brigsM
10-06-2003, 09:00 AM
Hi James…
Thanks for the suggestion. I’ve used ‘self.resizeTo’ before but have never worked out how to ‘resize’ to fullscreen mode and/or allows for different resolutions. The flash intro I have requires ‘fullscreen’. One option in the swf is to not continue and close the fullscreen, and I’m trying to avoid a superfluous browser window opened that’s only purpose was to open secondary window in fullscreen.
I’ve got this script to work. Of course window.self.close(); on the default window usually hits the browser security and the standard ‘ The web page you are viewing is trying to close the window – Do you want to close this window – YES / NO ’ alert is issued to the viewer.function fullScreen()
{
fswin = window.open("anyflash.swf","secondWindow","fullscreen,scrollbars").focus();
//set new window as the opener to bypass security
window.opener = 'secondWindow';
//close original window that was the inital opener without alert
window.self.close();
} This changes the ‘window.opener’ to the second fullscreen window allowing the initial window to close as soon as it has opened the fullscreen circumventing the security alert.
Messy in my mind, but hey I’m not proud as long as it works. Trouble now is that it only works for IE and not for Netscape 6 and 7.
Any further suggestions on self.resizeTo, how to get my work around going for Netscape, or anything else would be much appreciated.