0 Replies Latest reply on Aug 16, 2007 4:57 AM by toomcfly

    filterfunction

    toomcfly
      i have a problem filtering an array collection.

      the problem occurs when i filter for a string such as 'model 1'. my array collection has model 1, model 2 ....etc ..... model 11, model 12 .......

      if i filter by model 1 then it also returns model 11, model 12 etc. how can i specify that i only want a filter on 'model 1'

      my filter currently is

      private function filterModel(item:Object):Boolean
      {
      var isMatch:Boolean = false
      if(item.Company.indexOf(modelChosen) >= 0)
      {
      isMatch = true
      }
      return isMatch;
      }