# Help, Sprite problem

**URL:** <https://forum.kirupa.com/t/help-sprite-problem/316156>\
**Category:** flash\
**Created:** [November 14, 2010, 6:14pm UTC](https://forum.kirupa.com/t/help-sprite-problem/316156 "2010-11-14T18:14:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LoveTheresa](https://avatars.discourse-cdn.com/v4/letter/l/aeb1de/32.png) [@LoveTheresa](https://forum.kirupa.com/u/LoveTheresa)\
**Post date:** [November 14, 2010, 6:14pm UTC](https://forum.kirupa.com/t/help-sprite-problem/316156/1 "2010-11-14T18:14:54Z")

</div>

below are the fundamental code of drawing a sprite and place it on stage:

var list: Sprite = new Sprite ();  
list.graphics.beginFill(0x333333);  
list.graphics.drawRect(100,100,100,100);  
addChild (list);

i’m trying make like 10 to 20 sprite to place it on stage, is there a way to create them in the form of an array or loop? so that i no need to use the “new” keywords 20 times?

or anyone know the shortest way to create them besides than just draw them on the stage?

_i’m sorry on my question, I’m actually want to create 20 sprite with 20 instances name so that i can place them on the stage in the position i want and interact with them_

for simplification, can anyone show me the code to make just 3 sprites without having to type

var sprite1: sprite = new Sprite();  
var sprite2: sprite = new Sprite();  
var sprite3: sprite = new Sprite();
