My project includes a main AIR window and another presentation window
to be displayed in a second large monitor. I have to use SHOW_ALL
scale mode to scale everything in that window but not layout for sure.

The problem is the presentation window is built with Flex
containers/components, in my short test, it scaled, but quite buggy. I
know Alex has discussed about this for Flex in browsers, but there's
somewhere else to adjust settings in html, but not Flex nativewindows
in AIR applications.

My experiments code as follow. Any help appriciated.

Thanks,
George

===================================================
main.mxml:
############

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute" applicationComplete="this.init()">
        <mx:Script>
                <![CDATA[
                        import mx.core.Application;
                        private var subWindow:PresentationWindow = null;
                                                
                        private function init():void
                        {
                        }
                        
                        private function openNewWindow():void
                        {
                                if(!this.subWindow){
                                        this.subWindow = new 
PresentationWindow();
                                        this.subWindow.open();
                                } else {
                                        this.subWindow.open();
                                }
                        }
                        
                        private function maxNewWindow():void
                        {
                                if(this.subWindow){
                                        //this.subWindow.maximize();
                                        this.subWindow.test();
                                }
                        }
                        
                ]]>
        </mx:Script>
        <mx:Button x="165" y="105" label="open presentation window"
click="this.openNewWindow()"/>
        <mx:Label x="165" y="135" text="Drag presentation window to second
monitor"/>
        <mx:Button x="165" y="189" label="maximize new window"
click="this.maxNewWindow()"/>
</mx:WindowedApplication>

############
PresentationWindow.mxml
############

<?xml version="1.0" encoding="utf-8"?>
<mx:Window xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute"
width="443" height="265" alwaysInFront="true" title="Presentation
Window" showFlexChrome="false" type="{NativeWindowType.NORMAL}">
        <mx:Script>
                <![CDATA[
                
                public function test():void
                {
                        this.maximize();
                        this.stage.scaleMode = StageScaleMode.SHOW_ALL;
                        /*
                        trace(this.stage.fullScreenWidth+ ' '+ 
this.stage.fullScreenHeight);
                        trace(this.x + ' '+ this.y);
                        trace(this.width + ' '+ this.height);
                        var tx:Number = this.x;
                        var ty:Number = this.y;
                        var tw:Number = this.width;
                        var th:Number = this.height;
                        this.stage.displayState = StageDisplayState.NORMAL;
                        this.x = tx;
                        this.y = 0;
                        this.width = tw;
                        this.height = th;*/
                }
                ]]>
        </mx:Script>
        <mx:Button label="Presentation Window" left="10" top="10" width="148"/>
</mx:Window>


Reply via email to