A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [RESOLVED] MC align issue

  1. #1
    Member
    Join Date
    Oct 2004
    Posts
    86

    resolved [RESOLVED] MC align issue

    Hello,
    I experience the following issue:

    My movie clip is not bottom aligned when window is resized.
    I noticed that everything works when I delete the line which tells the stage to not scale.

    PHP Code:
    //Stage.scaleMode = "noscale"; 

    But I need to keep that line because I don't want my swf to scale.

    My question is how can I resolve the issue with the bottom align of my mc? I already have addListener but seems it does not work when the "noscale" line presents.

    Attached is a basic example with just a couple of lines code for your convenience. Highly appreciate some help.
    Attached Files Attached Files

  2. #2
    Junior Member
    Join Date
    Nov 2007
    Posts
    14
    Actionscript Code:
    fscommand("allowFullScreen", "true");
    fscommand("allowscale", "false");
    fscommand("showmenu", "false");
    Stage.align = "TL";
    Stage.scaleMode = "noscale";
    function align() {
        square._x = (Stage.width-square._width)/2;
        square._y = Stage.height-square._height;
    }
    var myListener:Object = new Object();
    myListener.onResize = function() {
        align();
    };
    Stage.addListener(myListener);
    myListener.onResize();
    //
    var ease = 30;
    var panning = 0.35;
    var tilting = 0.05;
    square.onEnterFrame = function() {
        Xcam = square._x-(_level0._xmouse-Stage.width/2)*panning;
        //Ycam = square._y -(_level0._ymouse-Stage.height/2)* tilting
        square._x += (Xcam-square._x)/ease;
        //square._y += (Ycam - square._y)/ease;
    };

    Doesn't the _y in the align and the _y in the tilting code conflict ultimately? (I moved the code to the main timeline for the easing)

  3. #3
    Member
    Join Date
    Oct 2004
    Posts
    86
    It works
    THANK YOU for your prompt reply!

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