Re: [Flashcoders] What don't I understand about the display list?

2007-02-26 Thread Tim Consolazio
If you're doing this in the same frame, the fact that the object is no longer on the displaylist may not have been updated yet. Try moving the code throwing the error into the childRemove event. Daniel Thompson wrote: Why will the following error be thrown? Shouldn't the displayObject be

[Flashcoders] What don't I understand about the display list?

2007-02-25 Thread Daniel Thompson
Why will the following error be thrown? Shouldn't the displayObject be null? try { removeChild(getChildByName(background)); } catch (typeError:TypeError) { // do nothing } var displayObject:DisplayObject = getChildByName(background); if