Help with AS for duplicating MCs to fill stage

Some help with duplicating Movie Clips to fill stage.

stage size is 500 x 500
circles_MC is 25 pixels wide

what I wish to do is duplicate the movie (circles_MC) 20 times horizontally by 20 times vertically so I end up with the entire stage filled with (400) duplicates of “circles_MC” next to each other.

I know how to duplicate the clips, just can’t work out how to say if you reach the edge of the stage, start a new line of duplicates.

cheers in advance

:slight_smile: