It doesn't seem that setVisible(false) is called on all the children (that is, the loaders) - so overriding it in the loader-animation won't do the trick ... but I guess I could hook onto the parent in some way, yes - since ViewStack does seem to call setVisible(false) on the container ... I will look into that.
Thanks again for your suggestions :-) Bjorn 2008/6/26 Michael Schmalle <[EMAIL PROTECTED]>: > Hi, > > I don't know 'how' you have the view set up but, could you listen to the > change event from the loader? > > IE when it's added to it's parent's display list (viewstack), add the > listener there? > > parent.addEventListener(Event.CHANGE, stopLoader, false, 0, true); > > I only came up with this since I quickly looked at the ViewStack code. > > -------------------------------------- > > Scratch what I said above, just looked at the code again. > > When the lastChild is is hidden, it's done with setVisible() not .visible. > > So you should be able to override setVisible() and use your original logic. > > Mike > > > On Thu, Jun 26, 2008 at 7:56 AM, bjorn <[EMAIL PROTECTED]> wrote: > >> Thanks for the input Mike, >> >> it's a good idea which will solve my problem, but it is still sort of a >> last-resolution solution -- since I will need to have a list of all these >> loader-animations and stop each one of them - in additon to implementing a >> solution like this each time one of them is in use. >> >> I was hoping to have the loader-animation component fix this itself - if >> it knew when it was being displayed or not it could stop/start the >> animation. So that the programmer who uses the loaderanimation doesn't have >> to think about it :-) >> >> >> >> 2008/6/26 Michael Schmalle <[EMAIL PROTECTED]>: >> >> Hi bjron, >>> >>> This is just a guess but how bout adding a 'change' listener to the >>> viewstack and use the old index to get the last selected child, then get >>> it's timer and stop it with that. >>> >>> ... just a thought >>> >>> Mike >>> >>> >>> -- >>> Teoti Graphix, LLC >>> http://www.teotigraphix.com >>> >>> Teoti Graphix Blog >>> http://www.blog.teotigraphix.com >>> >>> You can find more by solving the problem then by 'asking the question'. >>> >> >> >> >> -- >> >> ======================== >> http://www.juicability.com - flex blog >> http://www.43min.com - funny movies >> > > > > -- > Teoti Graphix, LLC > http://www.teotigraphix.com > > Teoti Graphix Blog > http://www.blog.teotigraphix.com > > You can find more by solving the problem then by 'asking the question'. > > > -- ======================== http://www.juicability.com - flex blog http://www.43min.com - funny movies