When a line is removed, probably there are some tetrominoes above it, just like in the previous picture. Obviously you can't leave the game field as is, but you have to make the above pieces fall down to fill the removed lines.
The idea: Check all pieces above the removed line and move them down to fill the gap left by the removed line.
The development: We can do it by simply moving down one tile, all tetrominoes pieces above the line we just deleted, and updating fieldArray
array consequently.
Change checkForLines
function this way:
private function checkForLines():void { for (var i:int=0; i<20; i++) { if (fieldArray[i].indexOf(0)==-1) { for (var j:int=0; j<10; j++) { fieldArray[i][j]=0; removeChild(getChildByName("r"+i+"c"+j)); } for (j=i; j>=0; j--) { for (var k:int=0; k<10; k++) { if (fieldArray[j][k]==1) { fieldArray[j][k]=0; fieldArray[j+1][k]=1; getChildByName...