【问题标题】:Flex Mobile Project, How can I write by a dynamically TextArea to a .txt file?Flex 移动项目,如何通过动态 TextArea 写入 .txt 文件?
【发布时间】:2012-08-01 07:56:20
【问题描述】:

我在一个 flex 移动项目中有一些动态 textArea,以这种方式创建:

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);

单击保存按钮时,我想将它们的文本保存在 .txt 文件中。 我知道如何在 flex 移动项目中创建和编写,但我找不到选择 textAreas 的正确方法.. 我该怎么做?

提前谢谢你..

【问题讨论】:

    标签: android actionscript-3 file-io flex-mobile


    【解决方案1】:

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

    textArea.selectRange(startHere,endHere);

    应该做的伎俩。

    如果您指的是检索 TextArea 中的任何文本,您可以简单地访问 textArea.text,如果您正在寻找我不理解的其他内容。

    【讨论】:

    • 我想检索文本,但是我有多个textArea,所以我尝试将它们放在一个数组中,然后以这种方式写入文件:fs.open(creaFileTesti,FileMode.附加); for(var i:Number = 0;i
    猜你喜欢
    • 2020-11-15
    • 2011-10-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-01-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多