1 Reply Latest reply on Jun 18, 2010 2:14 AM by rHemanth

    Resizing problem

    Flash@dicts

      Hi,

       

      I'm trying to get my flash movie to scale differently depending on the available window size. When it gets below a certain size, the scaleMode should switch to "showAll". I have written this little function, but it doesn't seem to work. interestingly if I trace the value of scaleMode, it does show different values. It seems as though the mode will switch once, but not again.

       

      Stage.align = "LT";     

      var stageListener:Object = new Object();

      Stage.addListener(stageListener);

      function arrangeStage() {

          if (Stage.width < 1000 || Stage.height < 550){

         Stage.scaleMode = "showAll";

          }else{

          Stage.scaleMode = "noScale";    

         }

      }   

       

      arrangeStage()

      stageListener.onResize = function() {

              arrangeStage();    

      }

       

      Thanks,

      flashadicts