A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [F8] Automatically Capitialize first letter in dynamic text box

  1. #1
    Senior Member
    Join Date
    Apr 2004
    Posts
    156

    [F8] Automatically Capitialize first letter in dynamic text box

    Hi,

    I have a scene with input text, then that input text gets called into a dynamic text box on another scene via php. I just want to format the dynamic text box so no matter what the first letter is always capitialized. Is there as function to do this? Thanks.

    CSS has this ability with
    Code:
    text-transform: capitialize
    to clarify what I am trying to do.

    Thanks!

  2. #2
    Senior Member
    Join Date
    Jan 2004
    Posts
    141
    Could you not convert it after the text box is populated from php?

    (textbox is called 'test')
    Code:
    test.text = "peter";
    test.text = test.text.substring(0,1).toUpperCase() + test.text.substring(1,test.text.length);

  3. #3
    Senior Member
    Join Date
    Apr 2004
    Posts
    156
    Yeah I think the toUpperCase would make all the letters capitialized, not just the first one

  4. #4
    Senior Member
    Join Date
    Apr 2004
    Posts
    156
    How could I use css to format just the title_txt.text dynamic text box?

  5. #5
    Senior Member
    Join Date
    Jan 2004
    Posts
    141
    I just did a quick test with css and the text-transform property didn't work either. I don't think it's supported in flash. The example I gave doesn't make it all uppercase. Try it.
    Last edited by Captain Planet; 12-14-2007 at 05:29 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center