wer32
09-20-2009, 10:02 AM
In this simple application (last child in this post :) ) when press the button other panels blinks then fade out. Why?
Thanks for any posts.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:states>
<mx:State name="1">
<mx:RemoveChild target="{panel1}"/>
<mx:RemoveChild target="{panel2}"/>
<mx:SetEventHandler target="{button1}" name="click" handler="currentState=''"/>
<mx:AddChild position="lastChild">
<mx:Panel x="544" y="258" width="250" height="200" layout="absolute" addedEffect="Fade" removedEffect="Fade"/>
</mx:AddChild>
</mx:State>
</mx:states>
<mx:Panel id="panel1" x="28" y="258" width="250" height="200" layout="absolute" removedEffect="Fade" addedEffect="Fade"/>
<mx:Button id="button1" x="417" y="89" label="Button" click="currentState='1'" />
<mx:Panel id="panel2" x="286" y="258" width="250" height="200" layout="absolute" addedEffect="Fade" removedEffect="Fade"/>
</mx:Application>
Thanks for any posts.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:states>
<mx:State name="1">
<mx:RemoveChild target="{panel1}"/>
<mx:RemoveChild target="{panel2}"/>
<mx:SetEventHandler target="{button1}" name="click" handler="currentState=''"/>
<mx:AddChild position="lastChild">
<mx:Panel x="544" y="258" width="250" height="200" layout="absolute" addedEffect="Fade" removedEffect="Fade"/>
</mx:AddChild>
</mx:State>
</mx:states>
<mx:Panel id="panel1" x="28" y="258" width="250" height="200" layout="absolute" removedEffect="Fade" addedEffect="Fade"/>
<mx:Button id="button1" x="417" y="89" label="Button" click="currentState='1'" />
<mx:Panel id="panel2" x="286" y="258" width="250" height="200" layout="absolute" addedEffect="Fade" removedEffect="Fade"/>
</mx:Application>