in CS4:
public class TestComponent extends MovieClip{
var textInput:TextInput = new TextInput();
function TestComponent():void{
trace('textInput W x H: ' + textInput.width + 'x' + textInput.height);
trace('clip W x H: ' + width + 'x' + height);
addChild(textInput);
trace('textInput W x H: ' + textInput.width + 'x' + textInput.height);
trace('clip W x H: ' + width + 'x' + height);
}
}
output:
textInput W x H: 100x22
clip W x H: 0x0
textInput W x H: 100x22
clip W x H: 100x100
This is bizarre to me.
Does anyone know why the height has become 100 instead of 22, like the textInput. Right now I just have to store the height before adding stuff to it since components seem to “corrupt” it.