A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [F8] Sting replace help

  1. #1
    Eternal Newbie
    Join Date
    Apr 2006
    Location
    Bitter cold Hell of the crappy NW
    Posts
    392

    [F8] Sting replace help

    I have a dynamic text box that is populated by previous frames input boxes. The call to populate the dynamic box is vary large and contains more than just quoted text and variable names.

    Everything works perfect, but I have an issue I want to remedy. If I leave an input box blank in the previous frames I get "undefined" in the dynamic text box.

    I am using this string replace technique and it works well for what it does, but I need it to check the whole dynamic text box after being rendered for the "undefined" not a "string of text here" but instead a "dynamic.text"

    I can't figure it out as nothing is working. Ideas?

    ~MoN
    If I am wrong, please just correct me and move on.. there is no need for all that pointing and laughing! ~MoN

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    When you 'copy' the input textdields into the dynamic, don't add the blanck ones.

    If you start by declaring all inputs with a "" value:
    PHP Code:
    input1.text="";//same for all 
    Then in your copy function, add an if statement
    PHP Code:
    for (i=0i<numInputsi++) {
        if (!
    this["input"+i].text == "") {
            
    makeCopy();//call any custom function you have
    }


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