I’m having trouble successfully colliding the player and the blocks that i have descending from the top of the screen. The movieclip (_block) has multiple frames within it that are selected randomly every time it respawns at the top(_block_L, _block_C, _block_R). A simple set of IF statements are not accessing each other, so i figured that I need an Array with a FOR LOOP to handle this. So far I’m having no luck.
private function player():void
{[INDENT]var collision:Boolean = false;
var blockPos:Array = [_block_L,_block_C,_block_R];
var blockLen:int = blockPos.length;
for (var i:int = 0; i<blockLen; i++)[/INDENT]
{[INDENT] if (blockLen*.hitTestObject(_player))[/INDENT]
{
collision = true;
if (collision)
{
livesCount -= 1;
removeChild(getChildByName("_player"));
}
}
}
}