Make sure the text field is HTML enabled.
This function reads a string, and out puts a html formatted string based on the two colours you give it:
Code:
var myString = "this is some text\nthis is some text\nthis is some text\nthis is some text\nthis is some text";
function alternateTextColour(s:String, colour1:uint, colour2:uint):String {
var a:Array = s.split("\n");
var toReturn:String = "";
trace(a);
t.text = "";
for(var z:int = 0; z<a.length; z++) {
toReturn += "<font color=\"#"+(z&1?colour1.toString(16):colour2.toString(16))+"\">"+a[z]+"</font>\n";
}
return toReturn;
}
t.htmlText = alternateTextColour(myString, 0xFF0000, 0xFF);