/* Open a new FLash file (ActionScript 3.0). Select TimeLine --> Top Layer --> Frame 1 Select Window --> Actions (F9) Copy and paste this snippet Observe the output */ // We can sometimes determine how long to perform a loop programatically var idx = 0; var someString ="now is the time for" while ( idx < someString.length ) { trace (idx, " ", someString.charAt(idx) ); idx++; }