1 Reply Latest reply on Oct 18, 2007 10:42 AM by MrKnives

    Filtering Undefined variables from List component

    MrKnives Level 1
      alright i have 2 questions and 1 problem...
      when I split an array with a certain phrase/keyword the rest of the data that isnt filtered gets listed as undefined... I'm wondering how do I filter undefined strings/variables out of the list component... a flashkit.com dev helped me along with the code below and i also included the file i'm working on.
      I dragged a list component onto the stage and gave it the instance name my_list
      i got it to where it doesnt just say undefined but instead they popup the last variable/string repeatedly instead of the undefineds... can anybody tell me where I'm going wrong?
      I think it has something to do with the for loop

      The file I'm working on with the code I'm talking about http://www.mediafire.com/?bl4uyn2yytg

      for my questions... my first question (not my problem my problem is above) is when the code gets to this part "str = str.split("\r\n\r\n").join("");" it confuses me because it's the same variable inside a variable of the same name... can anybody give me any explanation or tutorial on how that works?

      and my second question is does anybody have any tutorials on how to work with arrays and strings cause that also confuses me..

      and that's it for my problem and my 2 questions... I'm really thankful for anybody that helps.