View Full Version : [AS3] Can't even create a TextArea Object

01-18-2009, 03:39 AM
I'm just trying to create a text area object and add it to the stage and everytime I try it gives me an error.

var plainTextArea:TextArea = new TextArea();
plainTextArea.verticalScrollPolicy = ScrollPolicy.ON;
plainTextArea.setSize(260, 360);
plainTextArea.move(10, 10);

This is the simple code that I copied directly from Adobe Livedocs just to test and see if it works. When I compile it I get these errors.

1046: Type was not found or was not a compile-time constant: TextArea.

01-18-2009, 03:45 AM
TextArea is a component, so you need to drag an instance of it to your library before you can instantiate it with code.

01-18-2009, 03:54 AM
^^ What he said.