?
Solved

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

Posted on 2006-06-29
5
Medium Priority
?
803 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
The goal of the tutorial is to teach the user how to how to record live broadcast.
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.
Suggested Courses
Course of the Month9 days, 2 hours left to enroll

765 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