Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TextFields 1

Status
Not open for further replies.

ice78991

Programmer
Nov 20, 2006
216
Despite the fact that a trace shows that I have created a textfield, no text is being rendered to the screen. How can I correct this?

var clip_mc:MovieClip = createEmptyMovieClip("name0_mc",4);
clip_mc._x = 20;
clip_mc._y = 20;
clip_mc._width = 100;
clip_mc._height = 100;
clip_mc.createTextField("name_txt",1,0,0,30,15);
clip_mc.name_txt.text="My Text";
trace(clip_mc.name_txt.text);
trace(clip_mc._x);
trace(clip_mc._y);
trace(clip_mc.name_txt._width);
trace(clip_mc.name_txt._height);
 
Code:
var clip_mc:MovieClip = createEmptyMovieClip("name0_mc", 4);
clip_mc._x = 20;
clip_mc._y = 20;
[b]/*[/b]
clip_mc._width = 100;
clip_mc._height = 100;
[b]*/[/b]
clip_mc.createTextField("name_txt", 1, 0, 0, 30, 15);
[b]clip_mc.name_txt.autoSize = true;[/b]
clip_mc.name_txt.text = "My Text";

Kenneth Kawamoto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top