Question

I want to run a two screen application with AIR on my Macbook Pro with Retina display.

On my left screen (the retina) there is kind of a console, with which you select a movie, on the right screen, there is the selected movie playing.

As usually, I use the StageScaleMode.SHOW_ALL to bring it nicely to fullscreen. But this time, it gets scaled way too big. Maybe 100 times too big. I see only a small top left corner of the movie. It only shows the correct size if I choose StageScaleMode.NO_SCALE;

Has anyone a guess why its like this?

here is the portion of the code, where I bring up the two windows and try to show it fullscreen.

public  function setToFullscreen(e:Event):void {

                    startTimer.stop();
                    startTimer.removeEventListener("timer", setToFullscreen);
                    windowBig = new NativeWindow(new NativeWindowInitOptions());
                    windowBig.width = 1870;
                    windowBig.height = 468;
                    windowBig.stage.displayState = StageDisplayState.FULL_SCREEN; 
                    windowBig.stage.scaleMode = StageScaleMode.SHOW_ALL;



                    windowBig.stage.align     = StageAlign.TOP_LEFT;
                    windowBig.title = "Second Screen Window";


                    windowSmall = stage.nativeWindow;
                    windowSmall.width = 1280;
                    windowSmall.height = 1024;
                    windowSmall.stage.scaleMode = StageScaleMode.NO_SCALE;
                    windowSmall.stage.align     = StageAlign.TOP_LEFT;

                    windowSmall.title = "First Screen Window";




                    ScreenManager.openWindowFullScreenOn(windowBig,2);

                    loader.load();

                             }

Thank you for your help!

No correct solution

OTHER TIPS

Like OP said it is not possible automatically with SHOW_ALL, but you can do it manually (here it's not exactly as SHOW_ALL: I'm only fitting content to window height, so it works for a window aspect ratio equal or wider than the content ratio, else content will be cropped):

newWindow.addEventListener(Event.RESIZE, onResize);

function onResize(e:Event):void
{
    content.height = newWindow.stage.stageHeight; // fit to height
    content.scaleX = content.scaleY; // keep width ratio

    // Extra: equivalent of StageAlign.TOP => centers horizontally
    // (assuming a content registration point at top-left)
    var contentRatio = 4/3; // in case content is wider than necessary, e.g. wide background
    content.x = newWindow.stage.stageWidth/2 - (content.height * contentRatio )/2;
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top