Current Position:Home > Adobe AIR - stage orientation / rotation

Adobe AIR - stage orientation / rotation

Update:11-30Source: network consolidation
Advertisement
Hello,
I'm developing an desktop AIR aplication.
At some point the user can rotate de aplication (0º or 180º).
I looked at the API and its possbile to change the application orientation on AIR for mobile as described on this article:
http://help.adobe.com/en_US/as3/dev/WS901d38e593cd1bac1c39723e12caaf5620c-7fff.html
Is kind of stupid it isn't possible on AIR for desktop...
Does anyone knows a way to accomplish this?
Rotate the stage, native window, main timeline... don't know... some weird hack?
I want to avoid the need for an empty sprite just to hold the other class and get my displaylist deeper...
Thank you.

The Best Answer

Advertisement
// This could be used instead of a container
//Caveats: All DisplayObjects (Sprites, MovieClips) must have theire Registration point in the center
//Use the stagewidth/height to determin the centerpoint of your stage (e.g. for A HD Monitor it would be 960,540
//to reposition all of your objects
var displayObjects:Array = new Array();
var displayObjectPoints:Array = new Array();
function getAllDisplayObjects():void{
    for (var i:int = 0;i<stage.numChildren; i++){
            displayObjects.push(stage.getChildAt(i));
            displayObjectPoints.push(new Point(stage.getChildAt(i).x,stage.getChildAt(i).y));
    simulateStageRotation();
function simulateStageRotation():void{
    //do the math for positioning your objects accordingly
  • Adobe AIR - stage orientation / rotation Update:11-30

    Hello, I'm developing an desktop AIR aplication. At some point the user can rotate de aplication (0º or 180º). I looked at the API and its possbile to change the application orientation on AIR for mobile as described on this article: http://help.adob

  • Problem with the orientation of the camera adobe air. Update:11-30

    Hello guys I am building a camera app on Android using Adobe Air However, I can not change the orientation of the camera, which only works in landscape mode. My app works in portrait mode, and I'm not getting this to fit the camera orientation. Any h

  • I0S7 StatusBar Overlays stage, Adobe Air 3.9 Beta Bug? Is there a Workarround Update:10-11

    Hi I am using Adobe air 3.9 Beta. It seems that iOS7 give you the the possibility to style the Statusbar. But if you open an adobe air application the statusbar overlays the stage by default. It creates problems with my tabs. I tested the app with an

  • I0S7 StatusBar Overlays stage, Adobe Air 3.9 Beta Bug VOTE this Bug Update:10-11

    Hi I am using Adobe air 3.9 Beta. It seems that iOS7 give you the the possibility to style the Statusbar. But if you open an adobe air application the statusbar overlays the stage by default. It creates problems with my tabs. I tested the app with an

  • StageWebView crashes Adobe AIR on iOS when assigning it a stage Update:11-30

    I'm having a problem with StageWebView on iOS (in Android it works fine). More exactly, It's an iPad app. I'm loading a dynamic PHP URL with StageWebView's loadURL method, and then I start building Flash interface elements in a left column (the Stage

  • Adobe air 3.4 + auto orient Update:10-11

    I'm having trouble with getting the app I'm creating (using Flash professional CS6) to auto orient reliably.  if the app is moved from portrait to landscape, it works fine.  when moved back from landscape to portrait, then the screen items do not mov

  • Adobe Air 3.0 iOS streaming H264/Speex over RTMP -- No Video Update:10-11

    Problem: H264/Speex RTMP stream from Flash Media Server doesn't display video.  Audio plays fine. Conditions: Adobe Air 3.0 iOS device (iPad 2, iOS4.3) App settings: <renderMode>direct</renderMode> Flash Builder 4.5.1 compiler settings: -swf-v

  • Adobe Air - Android emulator Update:11-30

    Hi, I am trying to put an android aplication working on the android emulator. I have developed it in Flash Cs5, then i have created the apk file and installed it on the emulator. The emulator has the adobe air for emulator installed. When i try to ru

  • How to record a time-limited video with Adobe AIR for iOS Update:10-11

    I am trying to record a time-limited video with Adobe AIR for iOS. For example, I want to implement the following function. Start a one-minute timer before launching CameraUI to record video. When the timeout event happens after one minute, stop reco

  • I want to hide the blue title bar from my adobe air application Update:10-11

    Hello I'm doing an aplication with Flash CS4, using adobe air in as3. I have some frames, and in the frame 25 there's a stop, when user clicks a button, go ahead to frame 27 and stage resize the whole screen, just like a FULL_SCREEN, and then I load