Trying to get Masking to work in Flash Builder

I’m sort of a newbie. I am trying to get an object to mask another and then have the maskee able to float and slide behind the mask.
Here is what I have so far:

private function getImage(img:Bitmap):void
{
AppControl.getInstance().workarea.addObject2(new ImageOnStage(img));
AppControl.getInstance().workarea.addObject3(new ImageOnStage3(img));

ImageOnStage(img).mask = ImageOnStage3(img);
}
addObject2 is an uploaded image and addObject3 is a sprite. They both load, but that is where the fun ends. Any help or constructive guidance is appreciated. Real headbanger here.