0

私は航空アプリの始まりを持っています.Fadeを使用して状態間を遷移しようとしています(理論的には、フェードアウトしてから次の状態にフェードインするシーケンス)。それをターゲットにする方法はありますか?すべての要素をフェードアウトするには、または targets="..." を使用してすべての要素をリストする必要がありますか?

グループ内のすべての要素をネストしようとしましたが、うまくいかないようです。

現在のコードの短縮版:

<s:states>
    <s:State name="HomeScreen"/>
    <s:State name="EnemyBuilder"/>
    <s:State name="EncyclopediaBuilder"/>
</s:states>
<fx:Declarations>
    <s:Transition toState="*" fromState="*" >
        <s:Sequence >
            <s:Fade alphaFrom="1" alphaTo="0" duration="250" target="{wrapper}" />
            <s:Fade alphaFrom="0" alphaTo="1" duration="250" target="{wrapper}" />
        </s:Sequence>
    </s:Transition> 
</fx:Declarations>

<s:Group id="wrapper" includeIn="HomeScreen, EnemyBuilder, EncyclopediaBuilder" >

<s:BorderContainer id="encounter" includeIn="HomeScreen" 
                   x="49" y="99" width="200" height="44" 
                   styleName="falseButton"
                   rollOut="alphaOver(event)" rollOver="alphaOver(event)" click="currentState='EncyclopediaBuilder'" >
    <s:Label x="48" y="8" color="#000000" fontFamily="Arial" text="Create a new encounter" />
    <s:Label x="48" y="24" color="#000000" fontStyle="italic" text="Single encounter" />
    <s:Image x="10" y="10" source="assets/001_01.png" />
<s:BorderContainer id="back" includeIn="EncyclopediaBuilder" 
                   right="20" bottom="20" width="200" height="44"
                   styleName="falseButton"
                   rollOut="alphaOver(event)" rollOver="alphaOver(event)"
                   click="currentState='HomeScreen'" >
    <s:Label x="48" y="16" color="#000000" fontFamily="Arial" text="Save and Return"/>
    <s:Image x="10" y="10" source="assets/001_01.png"/>
</s:BorderContainer>        
</s:BorderContainer></s:Group>  
4

1 に答える 1