Hello Matt, Here goes the code (as clean as possible). To get the error just switch between the states rapidly, by clicking in the "Home" and "Inbox" buttons.
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="100%" height="100%" currentState="Main"> <!-- Transitions Definition --> <mx:transitions> <mx:Transition id="toMain" fromState="*" toState="Main"> <mx:Parallel targets="{[panel2, panel3, panel5, vsAplication]}"> <mx:Sequence target="{vsAplication}"> <mx:SetPropertyAction name="visible" value="false"/> <mx:SetPropertyAction name="visible" value="true"/> <mx:Parallel> <mx:Iris showTarget="true" duration="350"/> <mx:Sequence> <mx:Fade alphaFrom="1" alphaTo="0.3"/> <mx:Fade alphaFrom="0.3" alphaTo="1"/> </mx:Sequence> </mx:Parallel> </mx:Sequence> <mx:Sequence target="{ panel2 }"> <mx:AddChildAction /> <mx:Iris filter="add" duration="1000" target="{ panel2 }" /> </mx:Sequence> <mx:Sequence target="{ panel3 }" startDelay="400"> <mx:AddChildAction /> <mx:Iris filter="add" duration="600" target="{ panel3 }" /> </mx:Sequence> <mx:Sequence target="{ panel5 }" startDelay="800"> <mx:AddChildAction /> <mx:Iris filter="add" duration="200" target="{ panel5 }" /> </mx:Sequence> </mx:Parallel> </mx:Transition> </mx:transitions> <!-- Effects Definitions --> <mx:Sequence id="seqToMainNoMenu1" target="{vwInbox}"> <mx:Parallel> <mx:Iris showTarget="true" duration="350"/> <mx:Sequence> <mx:Fade alphaFrom="1" alphaTo="0.3" /> <mx:Fade alphaFrom="0.3" alphaTo="1"/> </mx:Sequence> </mx:Parallel> </mx:Sequence> <!-- States Definition --> <mx:states> <mx:State name="Main"> <mx:AddChild target="{canvas1}" position="lastChild"> <mx:Panel x="0" y="50" width="180" height="189" layout="absolute" id="panel2"> </mx:Panel> </mx:AddChild> <mx:AddChild target="{canvas1}" position="lastChild"> <mx:Panel x="0" y="245" width="180" height="160" layout="absolute" id="panel3"> </mx:Panel> </mx:AddChild> <mx:AddChild target="{canvas1}" position="lastChild"> <mx:ViewStack id="vsAplication" bottom="0" top="50" left="190" right="0"> <mx:HBox label="Home" width="100%" height="100%" show="this.currentState='Main'" id="hbHome"> <mx:Panel layout="absolute" id="panel4" width="50%" top="0" left="0" bottom="0" height="100%" styleName="PanelNoticiasMundo"> </mx:Panel> <mx:Panel layout="absolute" width="50%" height="100%" bottom="0" top="0" left="250" id="panel6"> </mx:Panel> </mx:HBox> <mx:Panel id="vwInbox" label="Inbox" width="100%" height="100%" show="this.currentState='MainNoMenu'" showEffect="{seqToMainNoMenu1}"/> </mx:ViewStack> </mx:AddChild> <mx:SetProperty target="{canvas1}" name="y"/> <mx:SetProperty target="{canvas1}" name="x"/> <mx:SetStyle name="paddingBottom" value="10"/> <mx:SetStyle name="paddingLeft" value="10"/> <mx:SetStyle name="paddingRight" value="10"/> <mx:SetStyle name="paddingTop" value="10"/> <mx:SetStyle name="right" value="10"/> <mx:SetStyle name="left" value="10"/> <mx:SetStyle name="top" value="10"/> <mx:SetStyle name="bottom" value="10"/> <mx:AddChild target="{canvas1}" position="lastChild"> <mx:Panel x="0" y="410" width="180" height="160" layout="absolute" id="panel5"> </mx:Panel> </mx:AddChild> <mx:SetStyle target="{canvas1}" name="left" value="10"/> <mx:SetStyle target="{canvas1}" name="top" value="10"/> <mx:SetStyle target="{canvas1}" name="right" value="10"/> <mx:SetStyle target="{canvas1}" name="bottom" value="10"/> <mx:AddChild target="{canvas1}" position="lastChild"> <mx:ButtonBar dataProvider="vsAplication" horizontalAlign="right" x="10"/> </mx:AddChild> </mx:State> <mx:State name="MainNoMenu" basedOn="Main"> <mx:RemoveChild child="{panel2}"/> <mx:RemoveChild child="{panel3}"/> <mx:RemoveChild child="{panel5}"/> <mx:SetStyle target="{vsAplication}" name="left" value="0"/> </mx:State> </mx:states> <!-- Base State --> <mx:Canvas id="canvas1" x="0" y="0"> </mx:Canvas> </mx:Application> Thanks in advance, Nelson Batista --- In [email protected], "Matt Chotin" <[EMAIL PROTECTED]> wrote: > > Do you have a simple testcase that we can try? > > > > ________________________________ > > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of nelsoncostabatista > Sent: Thursday, March 30, 2006 12:29 AM > To: [email protected] > Subject: [flexcoders] Error when a Transition is interrupt > > > > Hello all , > > I'm gettingsome problems with Transitions. > > If the userinterrupts the execution of a Transition, selecting another > State that willstart another Transition, the objects in the screen will > be missdisplaced and when you make another action in the application, > you'll getthis error: > > "RangeError:Error #2006: The supplied index is out of bounds. > > at mx.core::UIComponent/addChildAt() > > ! at mx.core::Container/addChild() > > at mx.states::AddChild/apply() > > at mx.core::UIComponent/::applyState() > > at mx.core::UIComponent/::commitCurrentState() > > at mx.core::UIComponent/setCurrentState() > > ! ; & nbsp; at mx.core::UIComponent/set currentState() > > at Index/__hbHome_show() > > at flash.events::EventDispatcher/dispatchEvent() > > at mx.core::UIComponent/setVisible() > > at mx.core::UIComponent/set visible() > > at > mx.containers::ViewStack/mx.containers:ViewStack::updateDisplayList() > > at mx.core::UIComponent/validateDisplayList() > > at mx.core::Container/validateDisplayList() > > at mx.managers::LayoutManager/validateDisplayList() > > &n! bsp; at mx.managers::! LayoutMa > nager/::doPhasedInstantiation() > > at mx.core::UIComponent/::callLaterDispatcher2() > > at mx.core::UIComponent/::callLaterDispatcher()" > > > > Couldanyone help me with this problem. > > Thanks, > > Nelson Batista > > > > > > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.com > > > > > ________________________________ > > YAHOO! GROUPS LINKS > > > > * Visit your group "flexcoders > <http://groups.yahoo.com/group/flexcoders> " on the web. > > * To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of > Service <http://docs.yahoo.com/info/terms/> . > > > > ________________________________ > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

