PDA

View Full Version : textbox user input


elazzowhiper
12-12-2007, 11:42 PM
Hi i was just having trouble and would like an example maybe of a textbox thats gets user input for some integers. thanks again.

matbury
12-13-2007, 01:05 AM
This will create an input text field:
var userInput:TextField = new TextField();
userInput.type = TextFieldType.INPUT;
userInput.border = true;
userInput.width = 150;
userInput.height = 25;
userInput.x = 20;
userInput.y = 20;
addChild(userInput);

You'll probably be interested in the related classes - TextEvent, TextFormat,TextFieldAutoSize, TextFieldType and TextFormatAlign. You can look them up here:
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/