Ultrashock Forums > Flash > ActionScript
Problems with Tab in text boxes

You are currently viewing our website as a guest which gives you limited access to forums, files and other resources.

Click here to join now for free, and start interacting with our members, download files and much more!

Click here if you are looking for our Flash files and other professional assets.
 
Post Reply | View first unread | Rate Thread Search this Thread | Thread Tools | Display Modes

#1
Bookmark and Share!
Problems with Tab in text boxes
Old 2008-09-13

Hi

I have one little problem. I created dynamically 3 text boxes and used setTextFormat to set the fonts, colors etc

But when I'm trying to navigate between these 3 boxes with Tab key, the setTextFormat is not working anymore

Take a look in the picture or at www.ktb.ro in the contact section.




Thank you
postbit arrow 3 comments | 254 views postbit arrow Reply: with Quote   
Registered User
byrg is offline
seperator
Posts: 7
2008-07-12
Age: 26
seperator

Ultrashock Member Comments:
r_bartoli r_bartoli is offline r_bartoli lives in Italy 2008-09-13 #2 Old  
Can we see the code?
Reply With Quote  
byrg byrg is offline 2008-09-13 #3 Old  
_root.contactFormText.createTextField("name_txt", 1, 0, 0, 400, 25);
_root.contactFormText.name_txt.type = "input";
_root.contactFormText.name_txt.multiline = false;
_root.contactFormText.name_txt.maxChars = 40;
var name_fmt:TextFormat = new TextFormat();
name_fmt.color = 0x666666;
name_fmt.font = "Trebuchet MS";
//my_fmt.bold = true;
name_fmt.size = 16;

_root.contactFormText.createTextField("subject_txt", 2, 0, 30, 400, 25);
_root.contactFormText.subject_txt.type = "input";
_root.contactFormText.subject_txt.multiline = false;
_root.contactFormText.subject_txt.maxChars = 40;

_root.contactFormText.createTextField("email_txt", 3, 0, 60, 400, 140);
_root.contactFormText.email_txt.type = "input";
_root.contactFormText.email_txt.multiline = true;
_root.contactFormText.email_txt.wordWrap = true;
_root.contactFormText.email_txt.maxChars = 300;

_root.contactFormText.createTextField("error_txt", 4, 0, 200, 400, 25);
_root.contactFormText.error_txt_txt.type = "dynamic";
_root.contactFormText.error_txt_txt.multiline = false;
_root.contactFormText.error_txt_txt.maxChars = 50;
var error_fmt:TextFormat = new TextFormat();
error_fmt.color = 0xff0000;
error_fmt.font = "Trebuchet MS";
//my_fmt.bold = true;
error_fmt.size = 12;
_root.contactFormText.error_txt.setTextFormat(error_fmt);


_root.contactFormText.name_txt.text = contentXml.firstChild.childNodes[7].childNodes[2].firstChild.firstChild.nodeValue;
_root.contactFormText.name_txt.setTextFormat(name_fmt);

_root.contactFormText.subject_txt.text = contentXml.firstChild.childNodes[7].childNodes[2].childNodes[1].firstChild.nodeValue;
_root.contactFormText.subject_txt.setTextFormat(name_fmt);

_root.contactFormText.email_txt.text = contentXml.firstChild.childNodes[7].childNodes[2].childNodes[2].firstChild.nodeValue;
_root.contactFormText.email_txt.setTextFormat(name_fmt);
Reply With Quote  
r_bartoli r_bartoli is offline r_bartoli lives in Italy 2008-09-13 #4 Old  
With only this code it's working perfectly.
Attached Files
File Type: zip test.zip (4.7 KB, 0 views)
Reply With Quote  
Thread Tools
Display Modes Rate This Thread
Rate This Thread: