tf.color = "0xff0000;
which should be:
tf.color = "0xff0000";
tf.color = 0xff0000;
next, make sure you have a textarea component in your library. (ie, drag from the component panel to the stage and then delete it).
if that doesn't solve the problem click file>publish settings>swf and tick "permit debugging". retest.
the problematic line number will be in the error message. that will indicate the object that doesn't exist when your code executes.
if you don't understand the above and how to solve the problem, indicate the problematic line number in your code.
Thanks Kglad.I put the TextArea component and it worked perfectly. You're the man.