-
AS is driving me nuts
Ok i am in a transition phase , i am trying to move from AS2 to AS#
so far it has smooth sailing but now i see a storm building up ahead
unless some can help me stear away
ok here is the problem
I have this code
function question() {
for (var i:int=0; i<questList.length(); i++) {
var ansList :TextField = new TextField;
ansList.type =TextFieldType.INPUT;
ansList.border = true;
ansList.x =(mytxt2.width+mytxt2.x)+10;
ansList.y=mytxt2.y;
questHolder.addChild(ansList);
}
}
my question is how do i retrieve the data entered into those text fields by users and store it for later use
any ideas??:confused:
-
You'll need to store references to those textfields so another function can find them later:
PHP Code:
var inputFields:Array = new Array();
function question() {
for (var i:int=0; i<questList.length(); i++) {
// ...
inputFields.push(ansList);
}
}
// ..
trace(inputFields[3].text);
-
Thanks a lot that worked!!!