0 Replies Latest reply on Sep 2, 2007 7:45 AM by PKENGLISH

    Stage scale to window slow

    PKENGLISH
      Hi,

      I am trying to create a full browser flash site and to calculate the change in the stage's dimensions I am using the following function:


      //start Stage re-size code
      Stage.align = "TL";
      Stage.scaleMode = "noScale";
      // ---> Create a new listener object
      var stageListener:Object = new Object();
      // ---> Define the resize function...
      stageListener.onResize = function() {
      // ---> first, get the new dimensions of the stage....
      var stageWidth:Number = Math.round(Stage.width);
      var stageHeight:Number = Math.round(Stage.height);
      };
      // ---> Apply the listener...
      Stage.addListener(stageListener);
      // ---> Run the function...
      stageListener.onResize();


      I then use this to make an object stay to the right etc by writing something like:
      element._x = Stage.width - 100;

      The problem i have is that my movie seems to lag when it resizes, giving it a very choppy appearance. I thought this might be a function of a low frame rate but even when that is cranked up to 30+ it's still an issue. Any ideas of how to smooth it? I have seen many sites that it works very smoothly so I am curious how they do it differently.

      Thanks!