Function to search an array : Function : Function Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Function » Function »

 

Function to search an array


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){


    }
    function findMatchingIndex(aTitles:Array,
                               sTitle:String):Number
    {
      for(var i:Number = 0; i < aTitles.length; i++) { 
    
        if(aTitles[i== sTitle) {
          return i;
        }
      
    
      return null;
    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Function
» Function