# Looping through about 10 bitmaps in the library and adding them to stage

**URL:** https://forum.kirupa.com/t/looping-through-about-10-bitmaps-in-the-library-and-adding-them-to-stage/227872
**Category:** flash
**Created:** [June 3, 2007, 10:53am UTC](https://forum.kirupa.com/t/looping-through-about-10-bitmaps-in-the-library-and-adding-them-to-stage/227872 "2007-06-03T10:53:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Mythic\_Fr0st](https://avatars.discourse-cdn.com/v4/letter/m/4da419/32.png) [@Mythic\_Fr0st](https://forum.kirupa.com/u/Mythic_Fr0st)
#### Post date: [June 3, 2007, 10:53am UTC](https://forum.kirupa.com/t/looping-through-about-10-bitmaps-in-the-library-and-adding-them-to-stage/227872/1 "2007-06-03T10:53:05Z")

</div>

basically, I dont wanna do

```auto
var t:Array = []
var bitClass1 = new img1()
t[0] = new Bitmap(bitClass)

```

that basically gets the image with the class img1, from my library, however I want to do this for 10, without repeating that each time, possibly up to 30-40 images,

its very important I can do something like this

```auto
for (i = 0; i<20; i++)
{
    var c:Class = new Class("img"+i)
    t* = new c
}

```

getting images from 0-19

how can I do this?
