-
How do I make a Flash HTML file full screen (can't see browser at all)?
-
Yeh, I was wondering the same thing... Nearly posted the same question a min ago (spooky!)
Anyway, I know this is an easy thing to do with flash projectors using an FS command, but how do you do it on the web with a browser?
-
Ok, I found some javascript to do the trick:
<script language="JAVASCRIPT"><!--
window.open("fullscreen.html","home","fullscreen=y es");
// -->
</script>
Put this in your header and sub the page you want full screen for "fullscreen.html".
This will work for IE browsers 4.0 and up. I dont know what it will do in netscape or on a mac (since I have a PC).
To close the window...
javascript:close()
Hope that helps a little.
[This message has been edited by noah (edited 02 April 2000).]
-
Senior Member
People, its a bit more diff. than that. ( actualy not ) I have to post the html code you have to change only the the browser detection settings and redirection. OK here it goes:
<HTML>
<HEAD>
< !-- Copyright 1999 FlashGen.Com info@flashgen.com If you wanna submit work to FlashGen.Com, send your emails to: info@flashgen.com-->
<TITLE>fullsrreen</TITLE>
</HEAD>
<SCRIPT LANGUAGE="Javascript">
< !-- //
function intro()
{
if ((navigator.appVersion.indexOf("Mac")!=-1) &&
(navigator.userAgent.indexOf("MSIE")!=-1) &&
(parseInt(navigator.appVersion)==4))
{
skip()
}
else
{
popup()
}
}
function skip()
{
location.href="change here for MAC usrs";
}
function popup()
{
version = parseFloat(navigator.appVersion.substring(navigato r.appVersion.indexOf('.')-1,navigator.appVersion.length));
if (version >= 4)
version = parseFloat(navigator.appVersion.substring(navigato r.appVersion.indexOf('.')-1,navigator.appVersion.length));
if (version >= 4)
{
if (navigator.appName=="Netscape")
{
location.href="Here for Netscape";
}
if (navigator.appName=="Microsoft Internet Explorer")
{
window.open("Here for IE","screen","fullscreen=yes");
}
}
else
{
location.href="and here";
}
}
// -->
</SCRIPT>
<BODY LINK="#000000" BGCOLOR="#000000" onLoad="intro()">
</BODY>
< !-- Copyright 1999 FlashGen.Com info@flashgen.com If you wanna submit work to FlashGen.Com, send your emails to: info@flashgen.com-->
</HTML>
change the links if you have diff.pages for Netscape,IE or Mac usr. Just copy and paste. I kept the credits.;-)
whish you luck People.
Mad-sci
-
Senior Member
OK this was a bit long . Here is the linkhttp://members.xoom.com/savco/stock/fullscreen.html
Left lower corner there is Close me option click on it a blank screen will appear just take the source. You have to change the links everything which is Stock.html.
Hope this helps.
Mad-sci
PS this is a link to game which I just finished if you want give it a try and tell me what you think
-
I looked at your full screen page and it's very cool. I tried to match the code up with mine and it's almost indentical but it still doesn't wanna go full screen. However, the close button does work fine.
-
Hey, while we are still on the subject... here is another piece of html that someone gave me. It looks like it does pretty much the same thing... I havent tried this one either, so don't know if it works or not. I post it solely for your pure amusement. (or confusion)
The one thing that I am still confused about is what kind of html page to make for the differnt browser and Opsys cases. Probably have to figure that out later i guess...
< html>
< head>
< title>fullscreen test< /title>
< meta http-equiv="refresh" content="5;URL=getflash.htm">
< script language="JAVASCRIPT">< !--
var platform;
var browser;
var version;
var adjWidth;
var adjHeight;
version = parseInt(navigator.appVersion);
if(navigator.userAgent.indexOf('Win') == -1) {
platform = 'Macintosh';
} else {
platform = 'Windows';
}
if(navigator.appName.indexOf('Netscape') == -1) {
browser = 'IE';
} else {
browser = 'Netscape';
}
function FullScreen(){
if((platform == 'Macintosh') && (browser == 'Netscape')) {
adjWidth = 20;
adjHeight = 35;
}
if((platform == 'Macintosh') && (browser == 'IE')) {
adjWidth = 20;
adjHeight = 35;
winOptions = 'fullscreen=yes';
}
if((platform == 'Windows') && (browser == 'Netscape')) {
adjWidth = 12;
adjHeight = 12;
}
if((platform == 'Macintosh') && (browser == 'IE')) {
self.location.href = 'macintoshie.html';
}
if(version < 4) {
self.location.href = 'normalwindow.htm';
} else {
var winWidth = screen.availWidth - adjWidth;
var winHeight = screen.availHeight - adjHeight;
var winSize = 'width=' + winWidth + ',height=' + winHeight;
var page = window.open('mainpage.htm', 'Intranet', winSize);
page.moveTo(0,0);
}
}
if((platform == 'Windows') && (browser == 'IE')) {
window.open("mainpage.htm","home","fullscreen=yes" );
} else {
onload=FullScreen();
}
// -->
< /script>
< /head>
< body marginwidth="0" marginheight="0" topmargin="0" leftmargin="0" bgcolor="#110000">
< script language="JavaScript">< !--
if((platform == 'Macintosh') && (browser == 'IE')) {
location.href = "macintoshie.html"
}
// -->
< /script>
< /body>
< /html>
-
Cool, it finally opens up to full screen.
Next on the agenda....can I get rid of the scroll bar on the right(it's only 800X600 anyways)? And how do I center the movie? Probably in Flash?
-
Senior Member
Create a table cell in html center it . Paste the movie as a plugin obj.
<EMBED src="/cgi-bin/ubb/Members/sigs/00000472.swf" quality=high WIDTH=170 HEIGHT=55 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> </EMBED>
-
Is this the same HTML you used? I actually havent tried it yet. Maybe I will if I get around to it.
< HTML >
< !-- Copyright 1999 FlashGen.Com info@flashgen.com If you wanna submit work to FlashGen.Com, send your emails to: info@flashgen.com-- >
< HEAD>
< META NAME="GENERATOR" CONTENT="Adobe PageMill 2.0 Win">
< TITLE>FlashGen.Com </TITLE>
< /HEAD>
< SCRIPT LANGUAGE="Javascript">
< !-- //
function intro()
{
if ((navigator.appVersion.indexOf("Mac")!=-1) &&
(navigator.userAgent.indexOf("MSIE")!=-1) &&
(parseInt(navigator.appVersion)==4))
{
skip()
}
else
{
popup()
}
}
function skip()
{
location.href="STOCKS.html";
}
function popup()
{
version = parseFloat(navigator.appVersion.substring(navigato r.appVersion.indexOf('.')-1,navigator.appVersion.length));
if (version >= 4)
version = parseFloat(navigator.appVersion.substring(navigato r.appVersion.indexOf('.')-1,navigator.appVersion.length));
if (version >= 4)
{
if (navigator.appName=="Netscape")
{
location.href="STOCKS.html";
}
if (navigator.appName=="Microsoft Internet Explorer")
{
window.open("STOCKS.html","screen","fullscreen=yes ");
}
}
else
{
location.href="STOCKS.html";
}
}
// -->
< /SCRIPT>
< BODY LINK="#000000" BGCOLOR="#000000" onLoad="intro()">
< /BODY>
< !-- Copyright 1999 FlashGen.Com info@flashgen.com If you wanna submit work to FlashGen.Com, send your emails to: info@flashgen.com-->
< /HTML>
-
Damn, I was lookin at the code on the second page. So this means that I'll need a second HTML file that just opens the flash HTML in a new window? Hopefully I can figure out this code. Thanks guys!
-
Senior Member
Yep, if you want you can set up different pages for IE,Netscape and Mac. change all ref. which are Stock.html. put this page in the dir. where your movie is.this is what i did:
fullscreen.htm.--->stock.html ( where the swf is) but you can call your swf directly not via html.
Mad-sci
<EMBED src="/cgi-bin/ubb/Members/sigs/00000472.swf" quality=high WIDTH=170 HEIGHT=55 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> </EMBED>
-
the easiest way is to just copy and past from sites that allready invented the wheel instead of reinventing it on your own
for example visit: http://www.cybertage.ic24.net/flash/default.htm
look at the source code and adjust it for your own site :-) also don't forget to make a close window button because they can't close it whith the cross button of the browser. Once again you could take the source code of my (under construction) page: http://www.cybertage.ic24.net/flash/close.htm
copy that to your own close.htm and put the action get url = close.htm in your flash site close button :-) good luck with it. I learned this from GrandmasterFlash also a member of the flashkit site. It helped me and it should help you too. Bye for now
Michel Staal
ICQ: 14898533
and if you don't want to cut and paste you could always write it yourselve. Use this as an example then :-)
and to get rid of the scrollbar put the scroll=no in the body tag
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|