A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Can Anyone help with fullscreen flash???

  1. #1
    Junior Member
    Join Date
    Jun 2007
    Posts
    4

    Can Anyone help with fullscreen flash???

    Hey there

    I am trying to design a full screen flash site. I have basic knowledge of Flash and actionscripting.

    The problem that I am having is I have a header that needs to remain at the top of my screen and stretch across the entire width regardless of browser or screen size. This contains links that must stay left aligned. This goes for the footer as well. Does anyone know how I would go about doing this?

    I have managed to get the background and stage to do what they are supposed to.

    If anyone could please help that would be great.
    Last edited by LevonGravett; 06-12-2007 at 09:47 AM. Reason: Grammer

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    I have managed to get the background and stage to do what they are supposed to.
    please post your actual code.
    See if you already use the Stage object.

    gparis

  3. #3
    Junior Member
    Join Date
    Jun 2007
    Posts
    4

    Thanks for the reply

    Here is code that you requested

    stop();

    Stage.scaleMode = "noScale";


    var HPositioner:Number = (Math.round((Stage.width - 980) / 2));

    function HPositionCubes () {
    var HPositioner:Number = (Math.round((Stage.width - 980) / 2));
    setProperty(topLeftCube_mc, _x, 0 - HPositioner);
    setProperty(topRightCube_mc, _x, (1058 + HPositioner) - 89);
    setProperty(bottomLeftCube_mc, _x, 0 - HPositioner);
    setProperty(bottomRightCube_mc, _x, (640 + HPositioner) - 89);
    }

    HPositionCubes();

    setProperty(bg_mc, _width, Stage.width);
    setProperty(bg_mc, _height, Stage.height);

    var resizeListener:Object = new Object();
    Stage.addListener(resizeListener);

    resizeListener.onResize = function () {
    setProperty(bg_mc, _width, Stage.width);
    setProperty(bg_mc, _height, Stage.height);
    }

    Thanks

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    SetProperty is deprecated. Instead of:

    Code:
    setProperty(bg_mc, _height, Stage.height);
    use

    Code:
    bg_mc._height = Stage.height;
    etc..


    use the same logic for the header:
    Code:
    header._width = Stage.width;
    And for the bottom position:
    Code:
    bottom._y = Stage.height - bottom._height;
    Make sure their instance names are well entered.
    And place these in the onResize

    And to align the Stage top left use:

    Code:
    Stage.align = "TL";
    gparis

  5. #5
    Junior Member
    Join Date
    Jun 2007
    Posts
    4

    Not working 100%

    Hi gparis

    thanks so much for your replies they are really helping...

    I have edited my scripting to the following:

    stop();

    Stage.scaleMode = "noScale";


    var HPositioner:Number = (Math.round((Stage.width - 980) / 2));

    function HPositionCubes () {
    var HPositioner:Number = (Math.round((Stage.width - 980) / 2));
    setProperty(topLeftCube_mc, _x, 0 - HPositioner);
    setProperty(topRightCube_mc, _x, (1058 + HPositioner) - 89);
    setProperty(bottomLeftCube_mc, _x, 0 - HPositioner);
    setProperty(bottomRightCube_mc, _x, (640 + HPositioner) - 89);
    }

    HPositionCubes();

    setProperty(bgGradient_mc, _width, Stage.width);
    setProperty(bgGradient_mc, _height, Stage.height);
    setProperty(header_mc, _width, Stage.width);
    setProperty(header_mc, _height, Stage.height);


    var resizeListener:Object = new Object();
    Stage.addListener(resizeListener);

    resizeListener.onResize = function () {
    setProperty(bgGradient_mc, _width, Stage.width);
    setProperty(bgGradient_mc, _height, Stage.height)
    setProperty(header_mc, _width, Stage.width);
    Stage.align = "TL";
    }

    The header only enlarges to the full width of the screen when I resize the browser window, however the background goes back to the centre.

    I tried with your suggestions but had to leave the setProperty in.

    If you could have a look at the code and let me know. If you would like me to mail you the layout so you know 100% what I am talking about I can.

    Thanks again

  6. #6
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    Anything you put in the onResize will only be triggered on resize of the browser - make sense Anything that need to happen on load need to be also written in the frame action. So you'll need to paste these same lines of code after the other lines in the same frame (after the HPositionCubes() call)

    gparis

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