public class Main extends Sprite{ public function Main(){ var example:String = "This string contains the word cool twice. Very cool."; var index:int = example.indexOf( "cool" ); if ( index != -1 ) { trace( "String contains word cool at index " + index ); } } } }
Related Scripts with Example Source Code in same category :