Random Fading Grid

Hello;

I’d like to make a 30x30 grid system.
When Flash is launched it selects a random box in the 30x30 grid and then
displays the boxes there( alpha 0 to alpha 100) then the other 4 boxes above,bottom , left and to the right of it and then continue like this until this ends (whole grid displayed) Please , I need help.

I wrote smth like that:

function displayBox() {
startPoint = random(amH*amV);
box.duplicateMovieClip(“box”+startPoint, depth);
focus = this[“box”+int(startPoint)];
focusU = this[“box”+int(startPoint-amH)];
focusD = this[“box”+int(startPoint+amH)];
focusL = this[“box”+int(startPoint-1)];
focusR = this[“box”+int(startPoint+1)];
visibleBoxes.push(focus,focusU,focusD,focusL,focusR);

trace(focus+" "+focusU+" "+focusD+" "+focusL+" "+focusR);
trace(visibleBoxes);
}

displayBox();

but cant calculate further.