Hi, Not sure what you are after, but you might try something like this:
import flash.display.*; var lista:Array = new Array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); for (i = 0; i < lista.length; i++) { var vSprite:Sprite = new Sprite(); vSprite.graphics.lineStyle(); vSprite.graphics.beginFill(0xAABBCC); vSprite.graphics.drawRect(10, 10, 10, 10); vSprite.graphics.endFill(); vSprite.x = lista[i] * 30; addChild(vSprite); } Hope that helps, Petro > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:flashcoders- > [EMAIL PROTECTED] On Behalf Of Gustavo Duenas > Sent: Thursday, April 26, 2007 7:11 PM > To: Flashcoders mailing list > Subject: [Flashcoders] as3 addchild question > > Hi Guys, I've just read that in AS3 there is no more > createEmptyMovieClip or attachMovie so there is addChild, but the > problem is when I use a loop to said this add child to load > a linkage movie several times, it doesn't appear in the screen but > one. here is the code I'm using in the flash 9 alpha. > > > > import flash.display.*; > > > > > > > var lista:Array = new Array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); > > trace (lista); > > for(i=0; i<lista.length; i++){ > > trace(lista[i]); > trace(newMovie + newMovieX); > var newMovie = this.addChild(new movie1()); > var newMovieX= newMovie.x+lista[i]*30; > } > > whe I do the trace the screen show several objects but I don't know > how to give them a different values for x. > I can do this in as2, but I'd rather do this in as3, since I'm > practicing with this now. > > any ideas? > I need help. > > > regards > > Gustavo Duenas > > _______________________________________________ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com