5 Replies Latest reply on Feb 28, 2008 10:39 PM by kglad

    scale limit

    Walloompoom Level 1
      Hi, I'm using this code to scale "port" ratio.. How would I limit the height scale to 480 instead of stage?
      That is, the stage is 700x600 but I want to limit "port" to 700x480 ratio.


      port._width = Stage.width;
      port._yscale = port._xscale;
      if (port._height >= port._yscale){
      port._x = Stage.width/2;
      port._y = Stage.height/2;
      }
      else{
      port._height = Stage.height;
      port._xscale = port._yscale;
      port._x = Stage.width/2;
      port._y = Stage.height/2;
      }