Solved

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

Posted on 2006-06-29
5
761 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
Comment Utility
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
Comment Utility
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
Comment Utility
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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Accessing Live Dynamic Stream 6 180
Flash Slides/Presnetation 4 70
Adobe Flash Player - PPAPI plugin 6 234
File conversion question 5 54
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…
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 set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
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.

744 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

17 Experts available now in Live!

Get 1:1 Help Now