About flash 8
Here is the small sample code. This will convert the lower case letter to upper case letter from left to right character by character.
TextField.prototype.caseAnimation = function(str) {
var tf = this;
tf.upperIx = 0;
tf.str = str;
var id = setInterval(moveUppercaseLetter, 100);
function moveUppercaseLetter() {
var str1 = tf.str.slice(0, tf.upperIx);
var str2 = tf.str.charAt(tf.upperIx).toUpperCase();
var str3 = tf.str.slice(tf.upperIx+1, tf.str.length);
tf.str = str1+str2+str3;
tf.text = tf.str;
tf.str = tf.str.toLowerCase();
tf.upperIx++;
if (tf.upperIx>tf.str.length-1) {
tf.upperIx = 0;
}
}
};
this.createTextField("animated_txt", 1000, 0, 0, 500, 25);
animated_txt.setNewTextFormat(new TextFormat("_typewriter", 16));
animated_txt.caseAnimation("pack my box with five dozen liquor jugs");
×