Packageflexlib.controls.textClasses
Classpublic class Finder



Public Methods
 MethodDefined by
  
findNext(string:String, caseSensitive:Boolean = true):int
Finds the first instance of a string after the Finder's current carat position.
Finder
  
findPrevious(string:String, caseSensitive:Boolean = true):int
Finds the first instance of a string before the Finder's current carat position.
Finder
  
indexesOf(string:String, caseSensitive:Boolean = true):Array
Gets all indexes of a string in the TextField.
Finder
  
setCarat(evt:MouseEvent):void
Synchronizes the Finder's internal carat position with the TextField's carat position when the user manually sets it by clicking in the TextField.
Finder
Method detail
findNext()method
public function findNext(string:String, caseSensitive:Boolean = true):int

Finds the first instance of a string after the Finder's current carat position.

Parameters
string:String — The string to search for.
 
caseSensitive:Boolean (default = true)

Returns
int — The character index of the string.
findPrevious()method 
public function findPrevious(string:String, caseSensitive:Boolean = true):int

Finds the first instance of a string before the Finder's current carat position.

Parameters
string:String — The string to search for.
 
caseSensitive:Boolean (default = true)

Returns
int — The character index of the string.
indexesOf()method 
public function indexesOf(string:String, caseSensitive:Boolean = true):Array

Gets all indexes of a string in the TextField.

Parameters
string:String — The string to search for.
 
caseSensitive:Boolean (default = true)

Returns
Array — An array of all the indexes of the string.
setCarat()method 
public function setCarat(evt:MouseEvent):void

Synchronizes the Finder's internal carat position with the TextField's carat position when the user manually sets it by clicking in the TextField.

Parameters
evt:MouseEvent