this is the code to create a sequence of pentagons that grow var xNumber:Number = 20; var yNumber:Number = 20; var total:Number = xNumber * yNumber; var g:Number = 40; var counter:Number = 0; createEmptyMovieClip("container", 0); for (i=0; i < yNumber; i++) { counter++; var atom:MovieClip = container.attachMovie("pentagon", "atom" + counter, counter); atom._x = 100; atom._y = i * g; var scale:Number = Math.random() * 150; atom._xscale = scale; atom._yscale = scale; } container.onEnterFrame = function(){ var counter:Number = total + 1; while(counter--) { var atom:MovieClip = this["atom" + counter]; if(atom._xscale < 200 ) { atom._xscale++; atom._yscale++; } } } this is the code to create the pentagon in a movieclip called pentagon var xc:Number = 0; var yc:Number = 0; var a:Number = 20*Math.cos(Math.PI/5)*Math.sin(Math.PI/5); var b:Number = 20*Math.sin(Math.PI/5)*Math.sin(Math.PI/5); var c:Number = 20*Math.sin(Math.PI/5)*Math.cos(Math.PI/20); var d:Number = 20*Math.sin(Math.PI/5)*Math.sin(Math.PI/20); createEmptyMovieClip("pent",0); pent.lineStyle(4,0xFF0000,50); pent.moveTo(xc,yc-10); pent.lineTo(xc+a,yc-10+b); pent.lineTo(xc+a-d,yc-10+b+c); pent.lineTo(xc-a+d,yc-10+b+c); pent.lineTo(xc-a,yc-10+b); pent.lineTo(xc,yc-10)