2 Replies Latest reply on Dec 9, 2013 7:29 AM by heidelcedric

    How to change the default orientation?

    heidelcedric Level 1

      Hello,

       

           I'm new to Adobe Flash Builder and I am currently making a mobile application for a school project. I was wondering how you change the default app orientation to landscape. I've tried going into my app.xml and change the aspect ratio to landscape with no luck, and it is very hard to find any answers on the internet. I would greatly appreciate your help.

       

      HomeView.mxml Code:

       

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

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

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

                          actionBarVisible="false" tabBarVisible="false" title="HomeView">

       

                <fx:Declarations>

       

                </fx:Declarations>

       

                <s:Image left="0" right="0" top="0" bottom="0" scaleMode="zoom" smooth="true"

                                     smoothingQuality="high" source="@Embed('file:///C:/Users/Owner/Downloads/48127-solarsystem-teaser.jpg')"/>

                <s:Button x="-5" y="0" width="410" height="1504"

                                      skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Sun)"/>

                <s:Button x="444" y="852" width="80" height="80"

                                      skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Mercury)"/>

                <s:Button x="628" y="742" width="120" height="124"

                                      skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Venus)"/>

                <s:Button x="836" y="632" width="127" height="117"

                                      skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Earth)"/>

                <s:Button x="994" y="506" width="99" height="96"

                                      skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Mars)"/>

                <s:Button x="1255" y="464" width="298" height="279"

                                      skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Jupiter)"/>

                <s:Button x="1626" y="302" width="274" height="270"

                                      skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Saturn)"/>

                <s:Button x="1965" y="196" width="175" height="174"

                                      skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Uranus)"/>

                <s:Button x="2201" y="66" width="175" height="174"

                                      skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Neptune)"/>

       

      </s:View>

       

      App.xml code:

       

      <!-- The initial aspect ratio of the app when launched (either "portrait" or "landscape").

                                    Optional. Mobile only. Default is the natural orientation of the device -->

       

                          <!-- <aspectRatio>landscape</aspectRatio> -->

       

       

                          <!-- Whether the app will begin auto-orienting on launch. Optional. Mobile

                                    only. Default false -->

       

       

                          <!-- <autoOrients>false</autoOrients> -->

       

       

      I need to make it so that the app is permanently in landscape.

       

      Thanks again.

           8th grade student