# AS3 Adding Bitmaps from the library

**URL:** https://forum.kirupa.com/t/as3-adding-bitmaps-from-the-library/223763
**Category:** flash
**Created:** [April 25, 2007, 4:45pm UTC](https://forum.kirupa.com/t/as3-adding-bitmaps-from-the-library/223763 "2007-04-25T16:45:24Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![stringy](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@stringy](https://forum.kirupa.com/u/stringy)
#### Post date: [April 25, 2007, 4:45pm UTC](https://forum.kirupa.com/t/as3-adding-bitmaps-from-the-library/223763/1 "2007-04-25T16:45:24Z")

</div>

I hope someone can see what i am doing wrong here.  
I have a jpg in the library with a class name Test(autogenerated) and my code

```auto
var bmp:Bitmap=new Bitmap();
			bmp.bitmapData=new Test();
			addChild(bmp);

```

Gives this error

```auto
Argument count mismatch on Test$iinit(). Expected 2, got 0.

```

I have found i can put any too parameters into the constructor and it works  
eg/

```auto
bmp.bitmapData=new Test("we",2);

```

I think i am missing something obvious but just not sure what.  
(I tried the code senocular posted in the AS3 tips and also needed to add the 2 arguments)
