Hi,
I think there’s a bug in addChild method, when I addChild same Sprite more then once, it draws more then once, then I try to removeChild it removes one of it but the display never removes from screen, after removing if you call node.getParent() it returns null. But the sprite or node is still drawing…
Problem causes from there’s no control of parent in addChild method. I node must have one sprite in theory, so I think addChild should be like that
addChild: function (child, …)
{
…
…
.
//Warnings etc.
var parent = child.getParent();
if (parent != null)
{
parent.removeChild(child);
}
//insertChild, setParent and other things…
.
…
…
}