2012-04-24 4 views

答えて

0

あなただけ

  1. プロジェクトStageOrientationEventクラスに

    パッケージflash.events {

    public class StageOrientationEvent extends Event 
    { 
        static public const ORIENTATION_CHANGE:String = "orientationChange"; 
        static public const ORIENTATION_CHANGING:String = "orientationChanging"; 
    
        public function StageOrientationEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) 
        { 
         super(type, bubbles, cancelable); 
        } 
    } 
    
    を追加するいくつかのトリックを行う必要があり、デスクトップアプリケーションでViewNavigatorのを使用することができます

    }

  2. ViewNavigatorの

    < sのための新しいスキン作成:スキンのxmlns:FX = "http://ns.adobe.com/mxml/2009" のxmlns:S = "ライブラリ://ns.adobe.com/をフレックス/スパーク」 のxmlns:FB = "http://ns.adobe.com/flashbuilder/2009" alpha.disabled = "0.5">

    <fx:Metadata>[HostComponent("spark.components.ViewNavigator")]</fx:Metadata> 
    
    <fx:Script fb:purpose="styling"> 
        <![CDATA[   
    
         override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void 
         { 
          super.updateDisplayList(unscaledWidth, unscaledHeight); 
         } 
        ]]>   
    </fx:Script> 
    
    <s:states> 
        <s:State name="normal" /> 
        <s:State name="disabled" /> 
        <s:State name="landscape" /> 
        <s:State name="portrait" /> 
        <s:State name="landscapeAndOverlay" /> 
        <s:State name="portraitAndOverlay" /> 
    </s:states> 
    
    <s:Group id="contentGroup" left="0" right="0" top="0" bottom="0" minWidth="0" minHeight="0"> 
        <s:layout> 
         <s:BasicLayout/> 
        </s:layout> 
    </s:Group> 
    

    </sで皮膚>

  3. あなたのプロジェクトにmobilecomponents.swcを追加します(私の場合はC:\ Program Files \ Adob​​e \ Adob​​e Flash Builder 4.6 \ sdks \ 4.6.0 \ frameworks \ libです) Sの\携帯用の\ mobilecomponents.swc)

直接ViewNavigatorのインスタンスにViewNavigatorのに新しいViewNavigatorのスキン(ステップ2)を割り当てる:

<s:ViewNavigator skinClass="path.to.skin.ViewNavigatorSkin"/> 

またはグローバルCSSの

s|ViewNavigator{ 
    skinClass: ClassReference("path.to.skin.ViewNavigatorSkin"); 
} 
1

方法の多くは、しかし、私はおそらくこれらのいずれかを使用したい:

  1. あなたはViewStackまたは他のナビゲーターを使用することができ、画面
  2. を変更するStatesを使用することができます。
+0

返信いただきありがとうございます..正確には必要ありません...私は1つの画面からanotheへのナビゲーションをしたいrスクリーン(1つのmxmlファイルから別のmxmlファイルへ).asフレックスでのモバイル(navigator.push view())のために使用します..このように –

+0

@francisdcunhaモバイルアプリケーションをWebに変換するとき。私はモバイルナビゲータからStatesに切り替えました。 – JeffryHouser