I'm trying to print some images on the stage but something goes wrong during collaudes, not all the images are printed, i traced them to verify if they exist, and they do, I verified they also have proper coordinates, and they do... You just can't see them... why? validFaces is an array containing some bitmaps, OXA is an array containing some Points, their coordinates should be parrallel as i've done... Why sometimes some of them are invisible?
function printOpponents():void{
for (var k:int = 0; k<numOpp; k++){
addChild(validFaces[k]);
validFaces[k].x = OXA[k].x;
validFaces[k].y = OXA[k].y;
}
}
Try making them above the highest index:
validFaces[k].parent
gets the the parent ofvalidFaces[k]
andsetChildIndex
sets the level it should be (ex: one object is shown above another)validFaces[k].parent.numChildren - 1
gets the Object at the highest index, therefore makingvalidFaces[k]
the Object that is on top of all others (validFaces[numOpp - 1]
is technically on top of all others).