0 Replies Latest reply on Aug 7, 2008 12:12 PM by rokosz

    stage scaling?

    rokosz
      (my code is at bottom)
      A button aligned with the bottom of the stage is desired to remain aligned with the bottom of the stage as the user resizes the window.
      As the height of stage is increased -- the _y of the button and the stage._height maintain their differential -- but the visible window shows the button moving faster down -- until its completely beyond the bottom of the window.

      Conversely, as the window height is decreased -- the differential remains accurate -- but the button ends up in the middle of the window. Resize to the original stage height -- and the alignment goes back to as it started.

      I've gotta be missing something. some sort of constraint or percentage/offset? Anybody know what it is? -- or if there's any easier way to maintain a button/object's alignment as the window/stage resizes?

      newbie flasher -- and I can't even get unzipped...

      Stage.scaleMode = "noScale"
      var myListener:Object = new Object();
      myListener.onResize = function () {

      trace("Stage size is now " + Stage.width + " by " + Stage.height);
      trace(btnNext._y)
      btnNext._y = Stage.height - btnNext._height
      btnPrevious._y = Stage.height - btnPrevious._height
      trace(btnNext._y)

      }
      Stage.addListener(myListener);