0

Flex 3で状態をリセット/再初期化する方法を知っている人はいますか?

次のコードがあるとします。

<mx:states>
    <mx:State name="Scene1">
        <mx:AddChild>
            <Scenes:Scene1 id="scene1"></Scenes:Scene1>
        </mx:AddChild>
    </mx:State>
    <mx:State name="Scene2">
        <mx:AddChild>
            <Scenes:Scene2 id="scene2" models="{models}"></Scenes:Scene2>
        </mx:AddChild>
    </mx:State>
</mx:states>

そして、1から2または2から1になるたびに、州全体を再作成したくありません.

4

1 に答える 1

0

これがあなたが探しているものかどうかはわかりませんが、このコードは上で定義した状態をレンダリングします:

// this shows Scene1
this.currentState = "Scene1";

// this shows Scene2
this.currentState = "Scene2";

それはあなたが探していたものですか?

于 2009-04-20T16:00:15.370 に答える