package com.imt.intimamedia.helpers { import mx.collections.ArrayCollection; import mx.controls.Alert; public class ComboBoxHelper { public function ComboBoxHelper() { } public static function findIndex( value: Object, provider : ArrayCollection ) : int { var index : int = 0; for each( var object : Object in provider ) { if( object.code == value ) { return index; } index++; } return -1; } public static function findIndexFromLabel( value: Object, provider : ArrayCollection ) : int { var index : int = 0; for each( var object : Object in provider ) { if( object.label == value ) { return index; } index++; } return -1; } } }