# Creating a sprite, and adding 100 instances to the stage

**URL:** <https://forum.kirupa.com/t/creating-a-sprite-and-adding-100-instances-to-the-stage/292650>\
**Category:** Uncategorized\
**Created:** [July 17, 2009, 12:45am UTC](https://forum.kirupa.com/t/creating-a-sprite-and-adding-100-instances-to-the-stage/292650 "2009-07-17T00:45:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![juskin](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@juskin](https://forum.kirupa.com/u/juskin)\
**Post date:** [July 17, 2009, 12:45am UTC](https://forum.kirupa.com/t/creating-a-sprite-and-adding-100-instances-to-the-stage/292650/1 "2009-07-17T00:45:57Z")

</div>

I thought would be coded like this:  
var sp:Sprite = new Sprite();  
sp.graphics.beginFill(0xFF88CC);  
sp.graphics.drawCircle(0, 0, 50);

```
for (var i:Number = 0; i &lt; 100; i++) {
addChild(sp);
sp.x = i * 1.5;
sp.y = i * 1.5;
}

```

however, I realize even tho im looping that addChild method, its still adding sp, so  
do I add a new naming convention in the loop, or should I be adding these instances  
to another display object… this seems like such a simple thing to do yet I cant figure it out,  
I also want to randomize the x and y, but this first seems to be the issue I need to address.
