Air 2.6 Screen orientation

I'm trying to get this Air 2.6 feature to work again.
http://kb2.adobe.com/cps/891/cpsid_89107.html
Changes in AIR 2.6
Screen orientation changes in 2.6 namespace
Based on the release doc, it says "The swf is required to be compiled with the flag "-target-player=11" to make use of supportedOrientations API."
How do I "compile with the flag" ???
I'm using Flash CS5 to publish .swf
I got the adt cmd line working.
My AS3 script:
addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, onOrientationChange);
function onOrientationChange(event:StageOrientationEvent):void {
     trace("onOrientationChange:"+event.afterOrientation);
    ...and process result.
Thanks,
Alfred

StageOrientationEvent.ORIENTATION_CHANGE and StageOrientationEvent.ORIENTATION_CHANGING are not part of the supportedOrientations API. If you want to prevent Portrait, you can do that like this:
stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGING, orientationChanging);
private function orientationChanging(e:StageOrientationEvent) {
if (e.afterOrientation == "default" || e.afterOrientation == "upsideDown") {
e.preventDefault();
That trick will work with AIR 2.0 as well as AIR 2.6, and without requiring player 11.

Similar Messages

  • How can I change screen orientation on my iPad air 2?

    How can I change the scrEen orientation on my new iPad Air 2? I do not see a lock device on the side like my old iPad has.

    Tap the padlock icon in Control Center.

  • Screen orientation changes to potrait in android device when wake up

    Please help me on this
    I am building an app in as3 for android and ios. I have set the screen orientation to LANDSCAPE in apple devices its working fine when I tried it in samsung galaxy tab its goes to potrait mode when the device wakes up please give solution to solve this

    Updated Air to 3.8, But still have the problem that lock the samsung tab with app running and wake up after 5 min screen orientation still in landscape(that what I set) that's fine but image shrinks like getting potrait view in Landscape

  • Screen orientation stuck

    My screen orientation on my iPad Air is stuck. I have reset my iPad, tried letting the battery die, and reset my settings. Nothing will fix my screen orientation.. Please help!

    iPhone, iPad or iPod screen will not rotate, fix
    http://appletoolbox.com/2013/03/iphone-ipad-or-ipod-screen-will-not-rotate-fix/
    iOS Screen Does Not Rotate
    http://support.apple.com/kb/ts3805
     Cheers, Tom

  • Can't seem to control screen orientation on Android

    I'm trying to use Flash Pro with Air 3.2. I'm used to making apps for iOS and the orientation handling seem much more elegant.
    Can someone point me in the right direction for Android. There must be a magic combination of setttings to get this to work?
    Trying to use this with Aspect set to Landscape and Orientation set to Auto, but it really freaks out on my Galaxy tab. Keeps switching all the time and rarely matches the orientation I am holind the tablet in.
    stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGING, orientationChangeListener);
    var startOrientation:String = stage.orientation;
    if (startOrientation == "default" || startOrientation == "upsideDown") {
              stage.setOrientation(StageOrientation.ROTATED_RIGHT);
    } else {
              stage.setOrientation(startOrientation);
    function orientationChangeListener(e:StageOrientationEvent) {
              if (e.afterOrientation == "default" || e.afterOrientation == "upsideDown") {
                        e.preventDefault();
    EDIT: I'm using a Galaxy Tab to test if that matters. It seems like my device is pretty slow to react to orientation on the desktop, but it goes haywire in my app.
    Thanks for any help you can provide.

    I guess if this is a feature in 3.3 it must be know to not work in 3.2?
    http://labs.adobe.com/technologies/flashplatformruntimes/air3-3/
    "Aspect Ratio Enhancements — With AIR 3.3 the issue with the runtime ignoring the specified aspect ratio has been resolved. In this release we address this use-case by allowing only screen orientation corresponding to app specified aspectRatio and orientation corresponding to 180 degree device rotation from the specified aspectRatio."
    Is there a workaround? Is it possible to prevent portrait view on a landscape app under 3.2? I can't get it to not distort my app to a portrait view.

  • I use photoshop elements 12 on Macbook air and the screen freezes when I try to use the tools. Then i have to force quit so i lose my work. anyone know how to fix this issue?

    I use photoshop elements 12 on Macbook air and the screen freezes when I try to use the tools. Then i have to force quit so i lose my work. anyone know how to fix this issue?

    What version of OS X are you using? If Yosemite, you need to update to 10.10.1 or higher.
    In any case, start by going to the editor preferences>general, clicking this button and restarting the editor:

  • HT202731 Macbook air 2014 model screen flickers when ever it is connected to minidisplay port to vga adapter?

    Macbook air 2014 model screen flickers when ever it is connected to minidisplay port to vga adapter?

    Hello EmPuah,
    The article linked below details a number of troubleshooting steps that can help resolve issues with your display.
    Apple computers: Troubleshooting issues with video on internal or external displays
    http://support.apple.com/en-us/HT201177
    Cheers,
    Allen

  • How do you turn off larger dynamic type on the iphone4 when your screen orientation is locked (vertically)?

    So I have the iphone 4 with the latests update ios7.
    So I went on settings > general > accessibility > larger type.
    And I clicked "on" for "larger dynamic type"
    Now my font is so big I can't even see apps that I have and such
    I want to turn it "off" but my screen orientation is locked! (I can't move my phone horizontally) I think if I can move my phone horizontally I'll be able to see the on/off button for larger dynamic type.
    I tried sliding the bottom upwards to turn off screen lock orientation but it's not on my screen because my font is set to a really big size that the "screen orientation lock button" didn't make it to the screen

    Turning on Dynamic type and increasing it shold not have that effect.
    Try a reset: Simultaneously hold down the Home and On buttons until the device shuts down. Ignore the off slider if it appears. Once shut down is complete, if it doesn't restart on it own, turn the device back on using the On button. In some cases it also helps to double click the Home button and close all apps BEFORE doing the reset.

  • IPhone 6 Plus Screen Orientation Sticks

    i have a 64gb iPhone 6 plus the screen orientation can go wrong pictures are upside down and then you have to power off the phone
    any person with the same problem
    Come on Apple get to right

    It's not a hardware problem so far as I am concerned.  Hardware problem would indicate that the accelerometers are "sticking" and making the phone think it's actually upside down.
    The weird thing is - on mine, when this happens, the springboard screen is completely upside down upon unlock.  If I continue to hold the phone right side up and I open any apps - they will correctly launch in the home button-down orientation.   Once I leave said app, springboard is still upside down.
    If it were an accelerometer (hardware) issue - then the apps would also load in the incorrect (upside down) orientation.   It simply is a bug with Springboard and I have no idea how to reproduce it - but I can say that it seems to randomly just decide to wake from sleep upside down.
    For me - the only way to "resolve" the issue is to restart the phone by either powering off and back on, or by holding both buttons until I see the apple icon (warm reboot).
    For clarity - I am using a 128GB 6+

  • Programmatically change screen orientation and/or resolution?

    We don't have VB.NET available and I was wondering if it is possible to create VBA code that would change:
    1) screen orientation (and maybe resolution)
    2) on a specific monitor (in a multiple monitor setup; we have two) 
    The idea would be to put it into an Excel workbook and have the macro autorun then exit.
    I see examples for C#.Net but can't find any for VBA. Maybe it's not possible. Your comments are appreciated. Thanks.
    Edit: ANY MS Office application can be used as long as it can be used via a shortcut on the desktop and run automatically. "One click and done" is the idea.

    Hello Doug,
    I believe you can use Windows API functions to get the job done.
    Anyway, the current forum is for Office Apps. I'd recommend asking VBA questions on the
    General Office Development  forum instead.

  • Programmatically change screen orientation and/or resolution using VBA?

    We don't have VB.NET available and I was wondering if it is possible to create VBA code that would change:
    1) screen orientation (and maybe resolution)
    2) on a specific monitor (in a multiple monitor setup; we have two) 
    The idea would be to put it into an Excel workbook and have the macro autorun then exit.
    I see examples for C#.Net but can't find any for VBA. Maybe it's not possible. Your comments are appreciated. Thanks.
    Note: ANY MS Office application can be used as long as it can be used via a shortcut on the desktop and run
    automatically. "One click and done" is the idea.

    Hi Dougmeister,
    I agree with Cindy that the VBA doesn't have function to achieve the goal. Also there is no function in Excel object for this requirement.
    The way we can achieve the goal is that using Windows API as Cindy motioned. And here is an helpful article talking about this topic:
    Office Talk: Working with VBA in the 32-bit and 64-bit Versions of Office 2010
    And about Windows API issue, I would suggest that you get more effective response from
    General Windows Desktop Development Issues forum.
    Hope it is helpful.
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Tablet PC Screen Orientation

    I am writing an application for MS Windows XP Tablet PC Edition and need to utilize the hardware rocker switches which come with the tablets. The problem comes when users rotate the screen. Hardware rocker switches have new directions after rotation but generate the same key codes. I guess I need to detect the orientation of the screen and adjust the reactions appropriately. Can anyone on the forum tell me how to find the screen orientation of a tables PC?
    Thanks

    I'm not sure, but just a thought... the screen isn't square, so does the Toolkit class return the correct screen dimensions for the screen's orientation? If it always gets the right dimensions, even when changed while the app is running, then you can infer which direction it is (if width is larger then height, it's one way, else the other)... unless you can rotate it to face all 4 sides... then that wouldn't work, I guess.

  • Change View State Based On Screen Orientation?

    I'd like my app to change layouts based on the current screen orientation.  I believe this is done through view states.  I have three questions...
    1) How do I check the current orientation?
    2) Is there an event listener that will tell me when the orientation changes?
    3) How do I toggle between view states?
    Thank in advance!
    UPDATE: I figured out the answer to question 3...
    currentState = 'yourStateName';
    UPDATE II: I figured out the answer to question 1 as well.  I simply used the Capabilities object to determine the screens current width & height, then compare the two.  All of this is in a function that gets called when the app launches:
    public function checkOrientation():void
         var screenWidth:Number = Capabilities.screenResolutionX;
         var screenHeight:Number = Capabilities.screenResolutionY;
         if (screenWidth > screenHeight) {currentState='yourStateName1';}
         else if (screenWidth < screenHeight) {currentState='yourStateName2';}
    Now all I have to do is figure out how to call this function when there is an orientation change.  I tried the code below but get the included error:
    stage.addEventListener(Event.RESIZE, checkOrientation); // ERROR: Access of undefined property stage
    Why can't access the "stage" property???

    Hi,
    I work on platform using flash bulider 4, later i finsh the platform but i meeting one problem is resize project to work with diffrent size screen, but i can't solve the problem, i need platform work with diffrent Screen Orientation without problem could some help  please, this that what i done in code please help.
    Thanks,
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:rtc="http://ns.adobe.com/rtc" width="100%" height="100%" backgroundColor="#51575D">
           <fx:Style source="Client.css"/>
             <fx:Script>
            <![CDATA[
                import mx.events.FlexEvent;
                import flash.events.FullScreenEvent;
                protected function txtUsername_enterHandler(event:FlexEvent):void
                    // TODO Auto-generated method stub
                    connectRoom.login();
                    labelUsername.visible = false;
                    txtUsername.visible = false;
                function fullScreenRedraw(event:FullScreenEvent):void
                    if (event.fullScreen)
                        width  = Capabilities.screenResolutionX;
                        height = Capabilities.screenResolutionY;
                    else
                        width = stage.stageWidth;
                        height = stage.stageHeight;
            ]]>
        </fx:Script>
           <fx:Declarations>
             <s:Move duration="500" id="moveEffect"/>
            <s:Resize duration="500" id="resizeEffect"/>
        </fx:Declarations>
                  <mx:Image x="0" y="0" width="100%"  height="100%" scaleContent="false" autoLoad="true" source="greenbackground.png"/>
                                     <rtc:ConnectSessionContainer horizontalScrollPolicy="off" verticalScrollPolicy="off" id="connectRoom" autoLogin="false"
                                           roomURL="https://collaboration.adobelivecycle.com/account/yourroom"
                                           y="20" width="95%" height="90%" backgroundColor="#212D4B" contentBackgroundColor="#F6F6F0" borderAlpha="1.0" cornerRadius="30" contentBackgroundAlpha="1.0" backgroundAlpha="0.4" x="33" dropShadowVisible="true" borderVisible="true">
                        <rtc:authenticator>
                                <rtc:AdobeHSAuthenticator userName="{txtUsername.text}"/>
                     </rtc:authenticator>
                          <rtc:SimpleChat width="293" height="258" x="2" y="165" chromeColor="#384D91"/>
                           <rtc:WebcamSubscriber y="4" displayUserBars="true"  width="292" height="158" x="2"/>
                     <rtc:AudioSubscriber id="audioSub" width="0" height="0"/>
                                         <rtc:FileShare height="135" width="290" x="5" y="425" chromeColor="#284C79"/>
                        <rtc:ScreenShareSubscriber id="scrShare" width="81%" height="99%" y="4" x="299"/>
        </rtc:ConnectSessionContainer>
        <s:Label id="labelUsername" y="230" text="   Enter a username and press Enter:&#xd;" color="#B5C40D" fontWeight="bold" horizontalCenter="0"/>
        <s:TextInput y="250" width="229" textAlign="center" id="txtUsername" enter="txtUsername_enterHandler(event)" color="#090909"
    horizontalCenter="0" height="27" fontWeight="bold" borderAlpha="0.99" contentBackgroundColor="#989A9C"/>
    </s:Application>

  • Is there any possibility for a MacBook Air With Touch screen??

    Is there any possibility for a MacBook Air With Touch screen??

    I think they call that the iPad.... 

  • Cat changed screen orientation from vertical to horizontal

    What key combination will reorient my display from horizontal back to vertical? Do you know someone who is looking for a cat. Ours is now looking for a new home.

    Here you go...
    http://www.dq.winsila.com/windows/windows-xp-tips/how-to-change-the-screen-orientation-in-windows-xp...
    Paul

Maybe you are looking for

  • Login twice in same apex app by same user not possible

    Hi, In itself it is possible to login twice by same user in same appl. But when using both apps on diff pages eachtime the user is prompted to login again. Why is that and why cant'w we use the app twice by same user. It is possible to use same app b

  • 802.1X wireless network problems with Intel Mac

    To login to the wireless network at my school I have to use an 802.1X connection authenticating with TTLS, TLS, EAP-FAST and PEAP protocols. This works intermitently. Some days my MacBook logs on quickly with no problems at all but most days it has a

  • SRM Catalog Item GUID-Characteristics table

    Hi I am trying to test class /CCM/CL_ITEM_MANAGER method GET_ITEM_DATA so that i can read catalog item and then update it back with new characteristic value using UPDATE_ITEM method. Issue is when hit F8 i don't see these methods to test i am trying

  • IPod touch "chokes" on Transfer of Playlists

    I've had a periodic problem where my iPod touch 2nd gen. will choke during the transfer of a kind of long playlist of new songs from iTunes to the touch. Typically this will involve a playlist of about 25 or so songs that were ripped from my CDs into

  • Use of Impact Test with SW Trigger(DAQmx) vi

    Hello, I working on modal analysis (with hammer) and so I am trying to use Impact Test with SW Trigger(DAQmx) vi but I don't get signal of the acceleration (should be acquire as voltage), whereas I get the impact. And when I impact the beam I have an