Passing in the name of a bitmap?

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.