# Adding a Bitmap file

**URL:** <https://forum.kirupa.com/t/adding-a-bitmap-file/303868>\
**Category:** flash\
**Created:** [January 28, 2010, 1:37pm UTC](https://forum.kirupa.com/t/adding-a-bitmap-file/303868 "2010-01-28T13:37:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![J\_Mo](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@J\_Mo](https://forum.kirupa.com/u/J_Mo)\
**Post date:** [January 28, 2010, 1:37pm UTC](https://forum.kirupa.com/t/adding-a-bitmap-file/303868/1 "2010-01-28T13:37:42Z")

</div>

Hi,

I have this AS3

```auto
var buttonWidth:Number = 60;
    var background:Shape = new Shape();
    background.graphics.beginFill(0x333333);
 background.graphics.lineStyle(1, 0xffffff);
    background.graphics.drawRect(20, -10, buttonWidth, 30);

```

How can I swap this for a png file??

Thanks  
Phil
