0

I have some dynamic textArea in a flex mobile project, created in this way:

var textArea:TextArea = new TextArea();
textArea.id = "txtCreaTaskAnalysis" + contatoreNumeroTextAreaCreaTaskAnalysis;
textArea.left = 235;
textArea.right = 90;
textArea.horizontalCenter = 85;
textArea.height = 200;
contatoreNumeroTextAreaCreaTaskAnalysis += 1;
this.gruppoCreaTaskAnalysis0.addElement(textArea);

When a save button is clicked, I want to save them text in a .txt file. I know how to create and write in a flex mobile project, but I can't find the correct way to select the textAreas.. How can I do that?

Thank you in advance..

1 Answers1

0

http://help.adobe.com/en_US/flex/using/WS02f7d8d4857b1677-165a04e1126951a2d98-7fe4.html#WS02f7d8d4857b1677-165a04e1126951a2d98-7fe2

textArea.selectRange(startHere,endHere);

Should do the trick.

If you're referring to retrieving whatever text is in the TextArea you can simply access textArea.text, if you're looking for something else I don't understand.

shaunhusain
  • 19,630
  • 4
  • 38
  • 51
  • I want to retrieve the text, but I have more than one textArea, so I tried to put them in an array, and after write in file in this way: fs.open(creaFileTesti,FileMode.APPEND); for(var i:Number = 0;i<=contatoreNumeroTextAreaCreaTaskAnalysis;i++) fs.writeUTFBytes(arrayTextAreaCreaTaskAnalysis[i].text +';'); fs.close(); But it doesn't work.. –  Aug 01 '12 at 08:21