What am I doing wrong here?
1. Copy the code below into a new Flash file and test it.
2. The text in teh box should be selected
3. Try typing in your name
4. Notice that the text format is lost
5. How do I make a dynamically created input text box retain text
formatting?
//create text style
var txt_style1:TextFormat = new TextFormat();
txt_style1.font = "arial";
txt_style1.align = "left";
txt_style1.bold = true;
txt_style1.size = 40;
txt_style1.color = 0x003366;
//create input text box
this.createTextField("name_txt", this.getNextHighestDepth(), 50, 50,
500, 100);
name_txt.multiline = false;
name_txt.wordWrap = true;
name_txt.html = false;
name_txt.type = "input";
name_txt.text = "Enter Your Name";
name_txt.setTextFormat(txt_style1);
Selection.setFocus(name_txt);
_______________________________________________
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