package{ import flash.display.Sprite; public class Main extends Sprite{ public function Main(){ var example:String = "a string"; for ( var i:int = 0; i < example.length; i++ ) { trace( example.charAt( i ) ); } } } }