PDA

View Full Version : text animation



NiñoScript
January 13th, 2006, 11:55 AM
maybe this is too simple, but i find it pretty :P
i wasted like 3 whole minutes of my life on it :azn:



var texto_str:String = "The quick brown fox jumped over the lazy dog.";
//1
var courier:TextFormat = new TextFormat();
//2
courier.font = "courier";
//3
var i = -1;
//4
onEnterFrame = function () {
if (i++<texto_str.length) {
//5
var mc_mc:MovieClip = _root.createEmptyMovieClip("movieClip_n"+(i), _root.getNextHighestDepth());
//6
mc_mc._x = 10*(1+i);
//7
mc_mc._y = -10;
//8
mc_mc._alpha = 0;
//9
mc_mc._xscale = 0;
//10
var texto_txt:TextField = mc_mc.createTextField("textfield", 1, 0, 0, 14, 16);
//11
texto_txt.setNewTextFormat(courier);
//12
texto_txt.text = texto_str.charAt(i);
//13
mc_mc.onEnterFrame = function() {
this._y = Math.min(1, this._y+1);
//14
this._alpha = Math.min(100, this._alpha+5);
//15
this._xscale = Math.min(100, this._xscale+10);
//16
};
}
};

NiñoScript
January 15th, 2006, 10:19 AM
0 replys :|

cmon...:*(
someone give me their comments so i can make it better... sniff, sniff :(

Deril
January 15th, 2006, 10:58 AM
Hm..

maybe try adding spirall motion..
letters fly in some circles... until they reach end point...

and maybe make this end point in the center of the screen..

could add interesting text.. like joke or something.. :)

just ideas..

senocular
January 15th, 2006, 11:16 AM
you got 25 lines - use them ;)