3 Replies Latest reply on Jun 4, 2009 11:03 PM by xhdreamlover-VT8xt5

    How to get the correct size of the loaded swf file?


      final public class main extends Sprite
        public function main()
         loaderInfo.addEventListener(Event.COMPLETE, _onLoadCompleted);
        private function _onLoadCompleted(event: Event): void
         var tw: int = stage.width;
         var th: int = stage.height;
         var tsw: int = stage.stageWidth;
         var tsh: int = stage.stageHeight;   




      Above is my simple as3 project in flex builder 3.

      My screen resolution is 1920*1080, when debugging, the swf is stretched to the full client area of the IE, but the stage.stageWidth is 500 and the stage.stageHeight is 375, both the stage.widht and stage.height are 0, who can tell me why and how to get the right size of the swf file, named the client area size of the IE in this situation?


      Thanks very much!