height property
Indicates the height of the display object, in dp.
The height
is calculated based on the bounds of the content of the
display object.
When you set the height
property, the scaleX
property is adjusted
accordingly, as shown in the following code:
var rect:Shape = new Shape();
rect.graphics.beginFill(0xFF0000);
rect.graphics.drawRect(0, 0, 100, 100);
trace(rect.scaleY) // 1;
rect.height = 200;
trace(rect.scaleY) // 2;
A display object with no content (such as an empty sprite) has a height of 0, even if you try to set height to a different value.
Implementation
@override
double get height {
throw 'Use `stage.stageHeight` instead.';
}