0 Replies Latest reply on Oct 20, 2008 9:02 AM by yogi bear

    expanding edges

    yogi bear
      I am trying to create a swf with a static center but with horizontal end bars that scale horizontally to match the browser size. How might this be achieved? Is it with stage class? I tried the code below which works as a SWF but can't get it working on a browser.

      I would also have a static center piece above this as a second piece of art. Would that also be positioned by the stage class.

      Any ideas would be helpful.


      Stage.scaleMode = "noScale";
      Stage.align = "TL";
      var stageListener:Object = new Object ();
      stageListener.onResize = positionContent;

      function positionContent():Void {
      if (Stage.width > Stage.height) {
      bar._width = Stage.width;

      bar._x = Stage.width/2 - bar._width/2;