# textField problem

**URL:** <https://forum.kirupa.com/t/textfield-problem/194818>\
**Category:** flash\
**Created:** [July 26, 2006, 3:09pm UTC](https://forum.kirupa.com/t/textfield-problem/194818 "2006-07-26T15:09:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![juniorspecial](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/juniorspecial/32/2610_2.png) [@juniorspecial](https://forum.kirupa.com/u/juniorspecial)\
**Post date:** [July 26, 2006, 3:09pm UTC](https://forum.kirupa.com/t/textfield-problem/194818/1 "2006-07-26T15:09:15Z")

</div>

I used this code to create runtime text fields:

this.createTextField(“tfText”, this.getNextHighestDepth(), 265, 50, 500, 500);  
tfText.html = true;  
tfText.multiline = true;  
tfText.styleSheet = styles;  
tfText.wordWrap = true;  
var lvText:LoadVars = new LoadVars();  
lvText.onData = function(sData:String):Void {  
tfText.htmlText = sData;  
};  
lvText.load(“proposal.txt”);  
scrollUp1.onRelease = function():Void{  
tfText.scroll -= 5;  
};  
scrollDown1.onRelease = function():Void{  
tfText.scroll += 5;  
};

On other frames, where I don’t want the text to show up, I tried creating a command to removeTextField. But it doesn’t seem to work:

onEnterFrame = function(){  
tfText.removeTextField();  
};

Any idea why this doesn’t work? Why I can’t remove the text field? Is it a depth problem?
