This script is key to fixing a small oversight by IE. When in fullscreen
mode, the right hand scrollbar is present no matter what. The window.open
parameter "...scrollbars=0..." only tells IE to color the
scroll bar with the page background color to mask it, but it truly is
not "full-screen". We are not removing the scrollbar, but stretching
the window just enough to push it off of the screen with the resizeBy()
function. The function calls in JavaScript are case-sensitive, the "resizeBy"
function must be called exactly that way or it will not work. It may
be necessary to adjust the value of 15 to produce the desired results.
Note that the bold portion of the code "WindowName" is what
you will use to reference the window from now on. newwin is a local
variable that will not extend past the scope of the launchwin() function.
2) Next, generate the html document that will be the
contents for the new window we are creating. I suggest using Flash to
generate these html documents to be sure that the object class id, codebase
and tags are configured correctly. Be sure to publish with the settings
set to 100% height and width or the Flash movie will not resize to fit
the window.
3) Edit the html document and change the <body>
tag to look like this:
<BODY bgcolor="#FFFFFF" topmargin="0"
leftmargin="0">
The topmargin and leftmargin parameters rid the browser of the default
margins of about 15 to 20 pixels. Without these parameters, your Flash
movie will never reach the edge of the screen.
4) There are many ways of calling the JavaScript function
"launchwin()". It can be called when the page loads by adding
the following to the <body> tag:
<BODY bgcolor="#FFFFFF" topmargin="0"
leftmargin="0" onLoad="launchwin()">
or you can place the call in a hyperlink as we did on this page:
<a href="javascript:launchwin()">Launch</a>
4) Closing the window is simple, simply add the following
actionscript into the Flash movie:
getURL("javascript:WindowName.close()")
This should be added both to the end of the movie to allow the Flash
movie to close the Full-Screen window itself when it is finished and
in a "skip" button to allow the visitor to opt out of viewing
the Flash movie.
Next Tutorial: Full-Screen Flash,
Part II (Frames Method)