Use of a for loop to loop through the characters of a string, one at a time
package{
import flash.display.Sprite;
public class Main extends Sprite{
public function Main(){
var sTitle:String = new String("ActionScript");
for (var i:Number = 0; i < sTitle.length; i++){
trace(sTitle.charAt(i));
}
}
}
}
A
c
t
i
o
n
S
c
r
i
p
t
Related examples in the same category