Полагаю, вы щелкаете в TextArea.
function ShowCurrentValue(evt:MouseEvent):void
{
var textArea:TextArea = (evt.target as TextArea);
trace(textArea.name + ": " + textArea.htmlText);
}
Если вы хотите перечислить все текстовые области, то я предлагаю вам во время создания поместить их в массив и выполнить итерацию по массиву:
import fl.controls.TextArea;
var totalTextArea = 5;
var textAreas:/*TextArea*/Array = [];
//Create multiple textarea
for(var a:int = 0; a<totalTextArea; a++)
{
var cta:TextArea = new TextArea();
cta.move(300,0+(a*100));
cta.setSize(100, 60);
cta.condenseWhite = true;
cta.htmlText = a+'TextAreaA TextAreaB TextAreaC TextAreaD';
cta.name="TA"+a
addChild(cta);
trace(cta.text)
cta.addEventListener(MouseEvent.CLICK, ShowCurrentValue);
// add to array
textAreas.push(cta);
}
//accessing TextArea
private function ShowCurrentValue(evt:MouseEvent):void
{
for(var b:int = 0; b < textAreas.length; b++)
{
var textArea:TextArea = textAreas[b] as TextArea;
trace(textArea.name + ": " + textArea.htmlText);
}
}