# Passing in the name of a bitmap?

**URL:** <https://forum.kirupa.com/t/passing-in-the-name-of-a-bitmap/281141>\
**Category:** Uncategorized\
**Created:** [February 5, 2009, 11:20am UTC](https://forum.kirupa.com/t/passing-in-the-name-of-a-bitmap/281141 "2009-02-05T11:20:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alber\_Kidd](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@Alber\_Kidd](https://forum.kirupa.com/u/Alber_Kidd)\
**Post date:** [February 5, 2009, 11:20am UTC](https://forum.kirupa.com/t/passing-in-the-name-of-a-bitmap/281141/1 "2009-02-05T11:20:23Z")

</div>

Hi,

I am writing a class that creates a MC graphic on the stage with a mix of images. I would like to pass the image or linkage name of the images into the function so it is more dynamic.

At the moment I have

public function smallBoxes()  
{

```
        var bgImage = addChild(new Bitmap(new boxBG(0,0)));
    }

```

but I would like to do is pass the linkage name (boxBG) into the small boxes function and create this dynamically. I know you can use [embed] is FP10 and flex but I am stuck with as3.

Any help/suggestions would be much appreciated.
