Solved

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

Posted on 2006-06-29
5
774 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

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…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
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.

786 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