cant place movie clip
so this is the function I have as of now
function placeGem(x:int, y:int) {
var newGemAmount:int = gems+1;
var gemOBJ:RainbowGem = new RainbowGem();
gemOBJ.x = x;
gemOBJ.y = y;
gemOBJ.name = "gem"+newGemAmount;
gemOBJ.visible = true;
background.addChild(gemOBJ);
//gems++;
trace("+----------------------------+");
trace("| Gems name: "+ gemOBJ.name);
trace("| Gems Y: "+ gemOBJ.y);
trace("| Gem X: "+gemOBJ.x);
trace("| Gems parent: "+gemOBJ.parent.name);
trace("+----------------------------+");
trace("\n");
}
and I get the right output*
+----------------------------+
| Gems name: gem3
| Gems Y: 300
| Gem X: 440
| Gems parent: background
+----------------------------+
but the object is not being placed. "background" is a movie clip that is where I want "gemOBJ" to be in.
any idea why I don't see it being placed?
