# Creating textfield on the fly

**URL:** https://forum.kirupa.com/t/creating-textfield-on-the-fly/54489
**Category:** flash
**Created:** [June 15, 2004, 5:58am UTC](https://forum.kirupa.com/t/creating-textfield-on-the-fly/54489 "2004-06-15T05:58:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![FlashBob](https://avatars.discourse-cdn.com/v4/letter/f/ec9cab/32.png) [@FlashBob](https://forum.kirupa.com/u/FlashBob)
#### Post date: [June 15, 2004, 5:58am UTC](https://forum.kirupa.com/t/creating-textfield-on-the-fly/54489/1 "2004-06-15T05:58:05Z")

</div>

Below is text for creating textfield on the fly. I want to create multiple fields, so I have variables for the names. But the code does not work - any ideas as to what is wrong?

loadText = new LoadVars();  
loadText.load(“data.txt”);  
loadText.onLoad = function() {  
myString = new String(this.row);  
myTextField = new TextField();  
myTextField.createTextField(myString,1,33,67,20,16);  
with (myTextField){  
text = this.row;  
border = true;  
myformat = new TextFormat();  
with (myformat){  
font = “Arial”;  
color = 0xff0080;  
size = 10;  
bullet = false;  
underline = true;  
}  
setTextFormat(myformat);  
}  
};
