Recently I had to put a mask to an UIComponent. Here is the way to do it:
var largeMask:UIComponent = new UIComponent();
largeMask.graphics.beginFill(0×00FFFF, 0.5);
largeMask.graphics.drawRect(0, 0, 120, 40);
largeMask.graphics.endFill();
largeMask.x = 0;
largeMask.y = 0;
this.addChild(largeMask);
this.mask = largeMask;
this should be UIComponent or Shape or similar object.
Obs: the mask must be added as child to the object you need to add the mask [...]