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 (on my computer), How can i do this?

Submitted by: Administrator
To achieve this you have to use flash CS4 with Flash Player 10 or above. Using the new method of filereference class you can save you typed text on your computer as a text file.

First create a object of filereference… then use the save method and pass your data to it.
var fR:FileReference =new FileReference()
fR.save("your Written text should be come here.","flexflashforum.txt")

Paste the following code on frame and run a sample application...

Code:
var TxtF:TextField = new TextField();
var BtnMc:TextField = new TextField();
var MyFile:FileReference = new FileReference();

TxtF.border = true;
TxtF.type = TextFieldType.INPUT;

BtnMc.background = true;
BtnMc.backgroundColor = 0xCCCCCC;
BtnMc.x = 150;
BtnMc.height = 20;
BtnMc.text = " Click here to save";
Submitted by: Administrator

Read Online Adobe Flex Actionscript Job Interview Questions And Answers