Skip to main content
Participant
May 3, 2012
Question

WindowedApplication and StageScaleMode.SHOW_ALL issues in 4.5.1 SDK

  • May 3, 2012
  • 1 reply
  • 522 views

Hello, hope someone can help me out. I am having an issue updating a project from 4.1 to 4.5.1 SDK and it can be demonstrated in the sample code below. In 4.1 when the window is maximized, it fills the entire screen and scales the content to fit. In 4.5.1 when the window is maximized, only the height is maximized and the width is constrained to 360.


Furthermore, the fullscreen display state in 4.5.1 is also being constrained to 360 under certain conditions. To reproduce this issue 1) launch the app 2) maximaize 3) set display state to fullscreen. If fullscreen state is entered before the window is maximized then it will behave as expected.

Thanks for any help.

<?xml version="1.0" encoding="utf-8"?>

<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"

                                                     xmlns:s="library://ns.adobe.com/flex/spark"

                                                     xmlns:mx="library://ns.adobe.com/flex/mx"

                                                     width="640" height="360"

                                                     showStatusBar="false"

                                                     applicationComplete="onApplicationCompleteHandler(event)">

          <fx:Script>

                    <![CDATA[

                              import mx.events.FlexEvent;

                              protected function onApplicationCompleteHandler( event:FlexEvent ):void {

                                        stage.scaleMode = StageScaleMode.SHOW_ALL;

                                        stage.align = "";

                              }

                              protected function onFullScreenButtonClick( event:MouseEvent ):void {

                                        stage.displayState = stage.displayState != StageDisplayState.NORMAL ? StageDisplayState.NORMAL : StageDisplayState.FULL_SCREEN;

                              }

                    ]]>

          </fx:Script>

          <s:Button label="big full screen button" width="640" height="360" click="onFullScreenButtonClick(event)"/>

</s:WindowedApplication>

This topic has been closed for replies.

1 reply

myobstAuthor
Participant
May 3, 2012

Forgot to add this is happening in Win7 x86, haven't tested other environments.