TextArea formatting

Apologies if this has been answered but my best attempts at googling have failed me, as have my books, adobe documentation, and a forum search! So again, sorry if this has been answered in detail.

Basically, I have a TextArea component with an instance name of inputText to start. I have 2 colorpickers on my stage, one will control the inputText font color, the other will control the inputText background color. At least, those are my hopes.

So to start, I wanted to just get my color picker’s change event to change all the text in TextArea to what was selected. I have 5 frames, the first frame will be my preloader (will be preloading a giant list of fonts later) and on frame 5 the following code appears:


stop();

import fl.controls.ColorPicker;
import fl.events.ColorPickerEvent;
fontColor.addEventListener(ColorPickerEvent.CHANGE,changeFontColor);

function changeFontColor(event:ColorPickerEvent):void {
    var myCP:ColorPicker = event.currentTarget as ColorPicker;
    var format:TextFormat = new TextFormat();
    var ta:TextFormat = new TextFormat();
    ta.color = "0x"+myCP.hexValue;
    inputText.setTextFormat(ta);
}

I get no errors when I check it, however, when I run the movie I get the following error: “1061: Call to a possibly undefined method setTextFormat through a reference with static type fl.controls:TextArea.”

What am I doing wrong? I’ve struggled with this problem for a full day now, so I’m turning to you for what I’m sure is an easy explanation as I learn AC3.

thanks!