Tex Field issues

I am trying to build a specialized word processor using Flash CS5 and I’m having some problems because I am new to this. I draw an editable TLF textfield instance on the fla file and name it “input”. Then on the actionscript file I’ve been trying to change the properties of the textfield by writing:

var textFormat:TextFormat = new TextFormat();
textFormat.color = 0x4444FF
textFormat.size = 18;
input.setTextFormat(textFormat);

but I get this error:

"Error #1009: Cannot access a property or method of a null object reference. "

Can anybody tell me what I’m going wrong?
My plan is to setup different allignments and fonts into different textFormat objects and then have to those textFormat objects get applied to different lines of inputed text in the textfield depending on user input. Is this possible to do? Or is there a better way?