Some favorite site feeds aggregated locally: iPhone Development RSS   Adobe Labs RSS   Macrumors RSS

Thursday, September 6, 2007

as3: swapChildrenAt buggy?

Thursday, September 6, 2007   

I have found that using swapChildrenAt( indx1:int, indx2:int ) is a bit buggy and have heard that instead one should employ removeChildAt( indx1:int ) followed by a addChildAt( index2:int ). Is this true and something that you use instead of the swap? I've seen some examples of how swapping is kind of buggy.
 
 Return to the main page
Comments:

There are currently 3 Comments:

Anonymous Keith Peters said...
“What exactly have you found? What have you heard? What have you seen?

Just saying something is "buggy" doesn't do much for me. If there's an issue there, I'd like to know about it.”
 
Blogger Ted Patrick said...
September 6, 2007 1:02 PM
“Eric,

This issue is true with Flex and with MovieClips added via the Flash CS3 timeline. For some reason, you must first remove a displayObject to add it back into the DisplayList. For non-Flex classes created with the 'new' constructor, these work perfectly.

Regards,

Ted”
 
Anonymous Keith Peters said...
September 6, 2007 1:27 PM
“Ah. Thanks Ted.”
 
 Leave a comment