Try using callLater on effectEnd to let the player finish drawing before running more code.
-Alex On 11/22/16, 10:48 PM, "bilbosax" <[email protected]> wrote: >I have a mobile app in which I need to wait until a transition is 100% >complete before I call on itemrenderers to populate a list. I have looked >and looked, and I actually don't believe that there is an event for this. > I >found this JIRA from way back in 2007 and there seems to still be no >solution: > >https://issues.apache.org/jira/browse/FLEX-10947 > >Here is the layout of the States and Transition in my app: > ><s:states> > <s:State name = "Home" /> > <s:State name = "Comps"/> > <s:State name = "Props"/> ></s:states> > ><s:transitions> > <s:Transition id="toComps" fromState="Home" toState="Comps"> > <s:Sequence target="{Comps}"> > <s:Move target="{Comps}" duration="300"/> > </s:Sequence> > </s:Transition> > > <s:Transition id="toHome" fromState="Comps" toState="Home"> > <s:Sequence target="{Comps}"> > <s:Move target="{Comps}" duration="300"/> > </s:Sequence> > </s:Transition> > > <s:Transition id="toProps" fromState="Comps" toState="Props"> > <s:Sequence target="{Listings}"> > <s:Move target="{Listings}" duration="300"/> > </s:Sequence> > </s:Transition> > > <s:Transition id="PropstoComps" fromState="Props" toState="Comps"> > <s:Sequence target="{Listings}"> > <s:Move target="{Listings}" duration="300"/> > </s:Sequence> > </s:Transition> ></s:transitions> > >The closest that I have come to a workaround is to listen for the >"effectEnd" event on either the Sequence tag or the Move Effect. >Unforunately, the transition is not completely finished when this happens >so >my component transitions about 90% into place before it starts to load my >itemrenderers which pauses the transition. It finally snaps into place >after almost 3 seconds. I need a better alternative. I also tried >listening to when a state was entered, but that happens way before >transition is complete. The google machine even failed me HaHa!! Does >anybody have any ideas for a good workaround to this problem? Again, I >need >to know when a transition is 100% complete and my component is in place. > >Thanks. > > > >-- >View this message in context: >http://apache-flex-users.2333346.n4.nabble.com/Event-Fired-When-A-Transiti >on-is-Complete-tp14202.html >Sent from the Apache Flex Users mailing list archive at Nabble.com.
