I think I'm having a very similar problem... I'm visually moving the child of one component to be placed over another with a Move effect and then changing the parent from the source component to destination component in the EffectEvent.EFFECT_END handler. I'm getting very similar errors intermittently... Anyone have ideas?
--- In [email protected], "thunderstumpgesatwork" <[EMAIL PROTECTED]> wrote: > > Hi guys, > > I'm trying to add an effect when changing the positioning (order) of > some GridItems in a GridRow. In my move function, I remove the child, > and add it back at a different index. This works fine with no effect, > however if I have a removeEffect and addEffect, I get an error. > > If I comment out the line that adds the child back in, it works (to > remove the child with the effect). > > When it trips the debugger on the error (see stack trace below), it > thinks that there's one more child than there really is! (one more > than the total number, not the number after one is removed) I even > tried calling the addChild in a callLater(), but that didn't work either. > > Any ideas anyone? > thanks, > Thunder > > RangeError: Error #2006: The supplied index is out of bounds. > at flash.display::DisplayObjectContainer/getChildAt() > at > mx.core::Container/getChildAt()[C:\dev\GMC\sdk\frameworks\mx\core\Container.as:2384] > at > mx.containers.utilityClasses::BoxLayout/measure()[C:\dev\GMC\sdk\frameworks\mx\containers\utilityClasses\BoxLayout.as:88] > at > mx.containers::Box/mx.containers:Box::measure()[C:\dev\GMC\sdk\frameworks\mx\containers\Box.as:250] > at > mx.core::UIComponent/mx.core:UIComponent::measureSizes()[C:\dev\GMC\sdk\frameworks\mx\core\UIComponent.as:5360] > at > mx.core::UIComponent/validateSize()[C:\dev\GMC\sdk\frameworks\mx\core\UIComponent.as:5306] >

