0

ボタンをクリックするだけでステージの状態を変えようとしています。問題はsome times、として例外を取得していThe supplied DisplayObject must be child of the callerます。これが状態を変えるためにしようとしていることです

this.currentState = 'fullScreen';

ここthisにありcanvasます。

これが州のMXMLですfullscreen

<mx:State name="fullScreen">
            <mx:RemoveChild target="{lstExpert}"/>
            <mx:RemoveChild target="{screenToggle}"/>

            <mx:AddChild  relativeTo="{outContainer}" position="firstChild">
                <mx:HBox id="topHeaderBox" horizontalAlign="left" verticalAlign="middle" width="98.5%" height="60"/>
            </mx:AddChild>

            <mx:AddChild relativeTo="{topHeaderBox}" position="firstChild" >
                <mx:Label id="lblCourseName" width="100%"  text="Name" color="#ffffff" fontFamily="Arial" fontSize="14" fontWeight="bold" height="20" />    
            </mx:AddChild>

            <mx:AddChild target="{screenToggle}" relativeTo="{lblCourseName}" position="after" />



            <mx:AddChild relativeTo="message" position="before">
                <mx:Spacer id="Bar" height="5" width="2" />
            </mx:AddChild>
</state>

ここでの間違いは何でしょうか?

4

1 に答える 1