Creating a grid of movieclips and adjusting the grid based on stage width and height

can anyone help me in creating a class or pointing me to a tutorial that shows how to create a grid of movieclips in as3 and also allows the grid to change column num and row num based upon the stage width and height?