dcsimg
A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: Full Screen Problem! Please Help!

  1. #1
    Junior Member
    Join Date
    Jan 2003
    Location
    Bucharest Romania
    Posts
    4

    Full Screen Problem! Please Help!

    Hello!

    I`ve made a movie using Flash 2.0 and I want it in fullscreen. I tryed in many ways but I didn`t succed. I tryed to follow the help from swish.. so I understand I should use the FSCommand.. I did like in the help but I dont understand what is THE CODE i should add in the html source.

    SCRIPT LANGUAGE="JavaScript">

    <!--

    // Detect Browser

    var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;

    // FSCommand handler for Netscape

    function Movie1_DoFSCommand(command, args) {

    var Movie1Obj = InternetExplorer ? Movie1 : document.Movie1;

    if (command=="TestFunction") {

    // ADD YOUR CODE HERE

    What code??? I really dont know...

    I really dont know many things about html sources.. so I`ve attached my source code to this msg. Please someone.. anyone.. explain me in the most easy way.. what should I do to have my movie in full screen.

    THANKS!!

    P.S. Sorry for my english!
    Attached Files Attached Files

  2. #2
    Senior Member Dead Rabbit's Avatar
    Join Date
    Oct 2002
    Location
    Back in Tampa FLA again - and happy!
    Posts
    2,403
    Right-click the very top row on the first frame of the movie. Select FS Command from the menu. In the Actions panel, click the small down arrow next to the box that says Command. Select FullScreen. Leave the argument box blank. This will force the movie to fill the available window.

    To force an html page to the max size, insert the following script in the head of the document, just before the closing < / head > tag.
    Code:
    <script language="JavaScript1.2">
    <!--
    
    
    top.window.moveTo(0,0);
    if (document.all) {
    top.window.resizeTo(screen.availWidth,screen.availHeight);
    }
    else if (document.layers||document.getElementById) {
    if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
    top.window.outerHeight = screen.availHeight;
    top.window.outerWidth = screen.availWidth;
    }
    }
    //-->
    </script>
    Hope this helps.
    While changing my profile, I accidentally clicked the link that said
    "Add 'Dead Rabbit' to your Ignore List"
    so now I can't talk to myself anymore...

    The Repository -:- The Forum

  3. #3
    Senior Member Cadence's Avatar
    Join Date
    Aug 2000
    Location
    Columbus, Ohio
    Posts
    3,428
    The FS COmmand for Fullscreen is only meant to be used with the Flash Standalone player (projector files) -- it won't do anything in the browser - sorry

    But, the code Dead Rabbit posted can be used to maximize the window ... otherwise (for complete fullscreen) - you will have to put the javascript in your HTML

    Cheers
    Brian

  4. #4
    Ein wilder Mann sauvage's Avatar
    Join Date
    Oct 2002
    Location
    Weißesdorf
    Posts
    855
    and if you want to display your movie fullScreen as Cadence has explained, here's the script --

    <html>

    <HEAD>

    <SCRIPT LANGUAGE="JavaScript">
    <!-- Original: Ronnie T. Moore, Editor -->
    <!-- Web Site: JavaScript Source -->

    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->

    <!-- Begin
    netscape = "netscape.html"; // set your browser pages
    explorer = "explorer.html";
    unknown = "unknown.html";

    // Determine the popup window properties
    // options include: top, left, toolbars, scrollbars,
    // menubar, location, statusbar, and resizable

    windowprops = "top=0,left=0,resizable=yes"
    + ",width=" + screen.width + ",height=" + screen.height;

    ns = (navigator.appName == 'Netscape');
    ie = (navigator.appName == 'Microsoft Internet Explorer');
    url = (!ns & !ie) ? unknown : ( ns ? netscape : explorer);
    window.open(url, "popupPage", windowprops);
    // End -->
    </script>
    </head><body>
    <p><center>
    <font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
    by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
    </center><p>
    </body></html>

  5. #5
    Junior Member
    Join Date
    Jan 2003
    Location
    Bucharest Romania
    Posts
    4

    For Dead Rabbit

    Hello! Thanks for the trying to help me. I`ve tryed to do exactly the way you said but the page still opens in normal window.. no change.. I left the argument box of FSCommand blank, the way you told me to do.. I`ve copyed the code you provide me and paste it in to the source... so now my source code is looking like in the attachment. But I stil dont know why is not working. Can you take a look and let me know where I was wrong please?

    I stil dont know what is that thing from source: //ADD YOUR CODE HERE.. I mean.. Is that the way should be? or I have to add any code there so the full screen will work?
    Attached Files Attached Files

  6. #6
    Junior Member
    Join Date
    Jan 2003
    Location
    Bucharest Romania
    Posts
    4

    For Cadence

    Dear Brian,

    I understand that the FSC will not work in browser.. and that I have to add that code.. the one that sauvage gave me.. I`ve tryed.. but.. surprise.. no result. I guess I go worng somewhere.. maybe I didn`t paste the code where it should be. Do you have any ideea where exactly sould I paste that code so the fullscreen will work? and can you tell me also what is that : //ADD YOUR CODE HERE.. from my HTML source?

    Thanks!

  7. #7
    X-Moderator AlienInLondon's Avatar
    Join Date
    Feb 2002
    Location
    London, UK
    Posts
    1,475
    This should be the easiest to do:

    Put the following html code in the BODY of an html page:
    Code:
    <p><a href="javascript:window.open('yourpage.html','anyname','fullscreen');void(0);">Click
    to launch fullscreen window</a></p>
    yourpage.html is the page with your swf movie. Remember to add a function in your movie to close the screen, as fullscreen does not give the user something to close the window with.

    Do it like this:

    1. Add some text (like 'X').
    2. Add the following action:
    -on press
    -javascript
    window.close()

    That's it, you're done.
    For 100's of free Swishmax and V2 downloads, tutorials
    and stunning site templates [CLICK HERE]

  8. #8
    Senior Member Dead Rabbit's Avatar
    Join Date
    Oct 2002
    Location
    Back in Tampa FLA again - and happy!
    Posts
    2,403
    In the code you sent, dump the first script:

    Code:
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    // Detect Browser
    var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
    // FSCommand handler for Netscape
    function welcome4_DoFSCommand(command, args) {
      var welcome4Obj = InternetExplorer ? welcome4 : document.welcome4;
      if (command=="FullScreen") {
        // ADD YOUR CODE HERE
      }
    }
    //-->
    </SCRIPT>
    so you don't have to worry about what code to put in there...

    In your embed tag, replace width="792" height="518" with width="100%" height="100%". This will cause the movie to fill the available window (which is now fullscreen because of the javascript in the < head > tag).

    If you want bigger, add scale="exactfit" in the embed tag just before the bgcolor= tag. WARNING - the "exactfit" scale will NOT maintain the aspect ratio and will cause your movie to distort to fill the entire available space on the window.

    As a reference, play with the settings on the Export Panel for html export and read the Swish Help file about the panel.

    This file will load you movie in a fullscreen window and 100% width & height, maintaining the aspect of the movie:
    Attached Files Attached Files
    While changing my profile, I accidentally clicked the link that said
    "Add 'Dead Rabbit' to your Ignore List"
    so now I can't talk to myself anymore...

    The Repository -:- The Forum

  9. #9
    Junior Member
    Join Date
    Jan 2003
    Location
    Bucharest Romania
    Posts
    4

    for Dead Rabbit

    Hi again!

    you helped me a bit... now the movie feet the window.. but is not full screen... I mean.. now.. the scrollbar is gone..

    I think that your first code you gave me has an error.. I`ve opened the HTML with FrontPage.. and in HTML source, a part is red.. that means that the code contain some errors.. am I right?

    Thanks again!

  10. #10
    Senior Member Dead Rabbit's Avatar
    Join Date
    Oct 2002
    Location
    Back in Tampa FLA again - and happy!
    Posts
    2,403
    Nope. In FP, the default color scheme displays script language code in red. It helps to follow the code to the end of the script.

    As for not fullscreen, it should be. top.window.resizeTo(screen.availWidth,screen.avail Height) will max the html page to the size of the screen as reported by the operating system.

    If you want chromeless windows, you could have a redirect on your first page that calls the movie page with
    Code:
    window.open("../index.html","","fullscreen,scrollbars")
    Check here for some good free scripts and other helpful html stuf:
    http://javascriptkit.com/cutpastejava.shtml or here:
    http://www.dynamicdrive.com for some good dhtml.
    While changing my profile, I accidentally clicked the link that said
    "Add 'Dead Rabbit' to your Ignore List"
    so now I can't talk to myself anymore...

    The Repository -:- The Forum

  11. #11
    Stupid Little Dreamer
    Join Date
    Aug 2000
    Location
    Toronto
    Posts
    583
    I encountered this scaling problem and stumbled upon a bizarre (yet simple) solution. I have no idea whether it will work for others, but it solved the problem on my PC and my client's Mac, so it's worth a try.

    At the very top of the HTML page in which your (ostensibly) full-screen SWF is embedded, place this code:
    Code:
    <!--//--><script></script>
    It was a happy accident for me that only took about five minutes. If it does work for anyone, I'd be curious to know.

    (BTW forgive me if this might be considered cross-posting, but I'm posting this answer in a few other threads just to help spread the word.)
    If it weren't for the last minute, nothing would get done ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center