Solved

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

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to disable  HTML5 video in chrome 2 1,579
Updating Flash Player with GPO 3 362
free photo watermark software 5 101
Adobe Products Forum? 3 165
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user how to how to record live broadcast.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

749 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