PDA

View Full Version : Am I missing an import?


mcmuffy
12-03-2010, 01:16 PM
The following line of code is throwing an error:
var tempTextFormat:TextFormat = myTextArea.getTextFormat(myTextArea.selectionBegin Index, myTextArea.selectionEndIndex);

Call to a possibly undefined method getTextFormat

Am I missing a library (I have flash.text.textformat included) or am I doing something wrong?

Cheers
Ray

greetification
12-03-2010, 07:45 PM
Can you post the full error?

dan.hunter
12-03-2010, 11:00 PM
I'm assuming myTextArea is a TextArea? Only TextFields have the getTextFormat method.

Try myTextArea.textField.getTextFormat instead.