The problem is if I set the .mask property of a Sprite object, the Sprite object still returns it's full height when I call Sprite.height. So I figured a simple way to overcome this would be to override the property getter.
Now.. even though that worked, if I add this masked Sprite object to another Sprite object, the new Sprite object will report it's height as the masked Sprite object's height even though I have overridden the property to return only the height of the visible area due to the mask. So it seems Flash ignores the fact that not all of the content is visible but still automatically increases the new Sprite object's height as if there was no mask on the masked Sprite.
So I am wondering if there is a workaround so I can add this masked object to any other DisplayObject knowing it will be resized to only what is visible in the masked object.
Thanks for any help.
EDIT
Here is a code example..
var content:Bitmap = new Bitmap(new BitmapData(50, 100, false, 0x000000));
var container:Sprite = new Sprite();
var mask:Bitmap = new Bitmap(new BitmapData(50, 50, false, 0x000000));
container.mask = mask;
container.addChild(content);
trace(container.height) // this should return 50 instead of 100