Solved

Something like fscommand("fullscreen", true); that works on the web?

Posted on 2006-06-29
5
768 Views
Last Modified: 2010-05-18
Im trying to g fullscreen when the user presses a button. when I use this on my computer:

 fscommand("fullscreen", true);

It works, but once it is online it doesnt. Is there a way to have a fullscreen flash movie on the web? (without the menubar, rollbars, taskbar etc) ?

Ive looked everywhere.

0
Comment
Question by:DanielWachy
  • 2
5 Comments
 
LVL 7

Expert Comment

by:muxxter
ID: 17012881
Hi DanielWachy.

You'll have to get fscommand to tell JavaScript to do it for you. In the webpage code, add a javascript function:

<swfDocumentName>_DoFSCommand(command, args) {
    if (command == "fullscreen") {
        if (args == "true") {
            // Do javascript fullscreen command here (I'm not sure what it is)
        }
        else {
            // Un-fullscreen
        }
    }
}

Where <swfDocumentName> is the name of the .swf file you're embedding into the page. (eg. thingy.swf -> thingy_DoFSCommand())
This function will now listen for any fscommand calls you send to it by thingy.swf.

MuXx
0
 

Author Comment

by:DanielWachy
ID: 17013155
I see what you did here. At first I was very excited but basically, this way you are still depending on a javascript function for the fullscreen. right ? and thats the main problem. There doesnt seem to be a way in java to get the current screen go to fullscreen.
0
 
LVL 7

Accepted Solution

by:
muxxter earned 250 total points
ID: 17031920
I think you're right, you can't set the current window to fullscreen. However, you can resize it:

<script>
self.resizeTo(<width>,<height>);
</script>

If you set the width and height to numbers bigger than the screen, the window will only get as big as the screen. Also, if you're willing to open a new window, you can do that from the flash document but using a getURL:

on (release) {
    getURL("javascript:NewWindow=window.open('http://www.tinyeye.com/','newWin','width=300,height=400,left=0,top=0,toolbar=No,location=No,
                scrollbars=Auto,status=Yes,resizable=Yes,fullscreen=Yes');NewWindow.focus();void(0);");
}

The getURL may need to be on one line, but it does work. I've tried it using Mozilla and IE. Let me know if you need something else.

MuXx
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Flash Slides/Presnetation 4 71
Flash Player Action Script Error 1090 5 197
Virus or Outlook 2007 problem, how to tell? 8 76
Flash Converter 8 113
This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now