I have I input text field on stage and I have a button also, further I am writing some text in that input text field. I want to save my written data on my local system (onmy computer), how can I do this? : adobe flex action script



I have I input text field on stage and I have a button also, further I am writing some text in that ..

Answer / Rajeev Kumar Malik

To save the text from an input text field to your local file system, you need to use File and FileStream classes in ActionScript. Here's a simple example:

```actionscript
private function saveText():void {
var stream:FileStream = new FileStream();
stream.open(new File("path/to/your/file.txt"), FileMode.WRITE);
stream.writeUTF(inputTextField.text);
stream.close();
}
```
In this example, the saveText() function saves the text from inputTextField to a file named 'file.txt' in your project's directory.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Adobe Flex Interview Questions

How can you show a jpg image in dynamic text field? : adobe flex action script

1 Answers  


How do you implement push on a flex applications?

1 Answers  


What are the goals of the beta?

1 Answers  


What is the difference between Flex 2.0 & 3.0?

1 Answers  


mic classes in flex? : adobe flex action script

1 Answers  


Explain the arguments of addeventlistener() method?

1 Answers  


Difference between Java & Flex Getters Setters?

1 Answers  


Explain what is the function of trace? : adobe flex action script

1 Answers  


Can you write to the file system from flex? : adobe flex action script

1 Answers  


Can I embed html in my flex application?

1 Answers  


Explain about arguments of addeventlistener() method?

1 Answers  


How do I make synchronous data calls in actionscript? : adobe flex action script

1 Answers  


Categories