Hello gurus!
While using addChild() method for populating children inside a rectangle Sprite; if I use:
mySquare.graphics.drawRect(250, 35, 175, 175);
instead of:
mySquare.graphics.drawRect(0, 0, 175, 175);
mySquare.x = 250;
mySquare.y = 35;
it makes a lot of difference. In first case, the following statements cause all the children fall outside the parent mySquare Sprite, whereas they fall inside the parent in the second case.
myCircle.graphics.beginFill(0xFFCC00);
myCircle.graphics.drawCircle(50, 50, 50);
square.addChild(myCircle);
I just want to understnad why is it like that. Any help, please!