Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static var characterNameField:TextField = new TextField();
- //This creates a text field which you can edit, still need to handle the getting of the info from the text field and saving of it.
- var fontSize = 30;
- characterNameField.defaultTextFormat = new TextFormat(Assets.getFont("Fonts/TIMES.TTF").fontName, fontSize);
- characterNameField.selectable = true;
- characterNameField.text = characterName;
- characterNameField.type = TextFieldType.INPUT;
- characterNameField.x = 210;
- characterNameField.width = 270;
- characterNameField.height = 50;
- characterNameField.y = 150;
- characterNameField.restrict = "A-Z 0-0 a-z";
- characterNameField.maxChars = 16;
- characterName = characterNameField.text;
- //characterNameField.autoSize = TextFieldAutoSize.LEFT;
- characterNameField.background = true;
- characterNameField.backgroundColor = 0xababab;
- characterNameField.border = true;
- myStage.addChild(pleaseEnterCharacterNameTextField);
- myStage.addChild( characterNameField );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement