I think is something related to the name of your textField, if it was created in the designing or programming mode
I got this sample from the ActionScript manual, tested it and it works fine this.createTextField ("my_txt", this.getNextHighestDepth (), 10, 40, 160, 120); my_txt.background = true; my_txt.backgroundColor = 0xFF0000; my_txt.border = true; my_txt.multiline = true; my_txt.type = "input"; my_txt.wordWrap = true; this.createTextField ("width_txt", this.getNextHighestDepth (), 10, 10, 30, 20); width_txt.border = true; width_txt.maxChars = 3; width_txt.restrict = "0-9"; width_txt.type = "input"; width_txt.text = my_txt._width; width_txt.onChanged = function () { my_txt._width = this.text; }; this.createTextField ("height_txt", this.getNextHighestDepth (), 70, 10, 30, 20); height_txt.border = true; height_txt.maxChars = 3; height_txt.restrict = "0-9"; height_txt.type = "input"; height_txt.text = my_txt._height; height_txt.onChanged = function () { my_txt._height = this.text; }; João Carlos Santiago ----- Original Message ----- From: "Phil Glatz" <[EMAIL PROTECTED]> To: <flashcoders@chattyfig.figleaf.com> Sent: Wednesday, June 07, 2006 6:55 PM Subject: [Flashcoders] changing the width of a dynamic text field >I have a single dynamic text field (pText) I'd like to dynamically > change the width of. It is multiline with a border, and other options are > off. > > When I execute the following actionscript: > > trace('w1:'+pText._width); > pText._width=200; > trace('w2:'+pText._width); > > > the trace output is: > > w1:400 > w2:375.7 > > > Why isn't the width of the textfield at w2 set to 200? Seems like it > should. (I'm prepared for a "d'oh" and slap to the forehead). > > _______________________________________________ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com