[RESOLVED] float/screen resolution?
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [RESOLVED] float/screen resolution?

  1. #1
    Member
    Join Date
    Sep 2010
    Posts
    30

    resolved [RESOLVED] float/screen resolution?

    Any help would be greatly appreciated!!
    I love this forum!!
    anyways

    site http://www.ciriljazbec.com/

    this site manage to scale to different resolution
    its like the size of his stage is dynamic?
    How does he do it?

    for example if you re size your browser window on his site
    the word "ciriljazbec photo" stays still
    but on the right of that thats says "all photo are own by..."
    moves as you re size your browser its like its floating?
    also when you resize the window his photo also gets bigger?

    can this be done alone by flash or you must use css and load multiple movieclip?
    Last edited by onenonly; 04-27-2012 at 11:14 AM.

  2. #2
    Senior Member
    Join Date
    Jul 2008
    Posts
    391
    The part about making the swf fit the whole browser screen is done with Javascript and CSS. Depending on how you embed the swf into the page, via swfobject or some other method, they all usually involve setting the width and height to 100%.

    The part about the objects is done in Flash. He is using these 2 lines to that tell the swf not to mess with the objects when it resizes:
    PHP Code:
    stage.scaleMode StageScaleMode.NO_SCALE;
    stage.align StageAlign.TOP_LEFT
    I'm not sure what differences there are between the different align modes but I always use top left. Once you have that, you can scale or move or do whatever to any objects you want according to the width and height of the stage with stage.stageWidth and stage.stageHeight.
    Last edited by 5Five555; 04-27-2012 at 07:27 PM.

  3. #3
    Member
    Join Date
    Sep 2010
    Posts
    30
    Thx for your reply!!

    I used
    Actionscript Code:
    stage.scaleMode = StageScaleMode.NO_SCALE;
    stage.align = StageAlign.TOP_LEFT;
    That does accomplish what the other website does.
    It doesnt resize the way i want it



    Actionscript Code:
    stage.scaleMode = StageScaleMode.NO_BORDER;
    stage.align = StageAlign.BOTTOM_LEFT;
    This accomplish the artwork where his main image resize proportional from the bottom left.
    Thx for help me solve one issues,

    Im still confused on how

    "ciriljazbec photo" stays still or float on the bottom left as I resize the window
    AND
    "all photo are own by..." float on the bottom right without resizing?

  4. #4
    Senior Member
    Join Date
    Jul 2008
    Posts
    391
    He is probably reupdating the x and y coordinates of the photo whenever the window is resized, which dispatches an Event.RESIZE event.

  5. #5
    Member
    Join Date
    Sep 2010
    Posts
    30
    thx I got it,
    add listener for resize in window size
    make sure under publish settings,
    in the html tab that dimension are on percent and set to 100 X 100.

    Actionscript Code:
    stage.scaleMode = StageScaleMode.NO_SCALE;

    stage.addEventListener(Event.RESIZE, resizeListener);

    function resizeListener (e:Event):void {


    }

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

Poll by Flashkit.com