-
problem with loading data from text file into an array????
hi all,
the code is about loading data from text file named:"data.txt"
the data in the file are as following:
&a1=1&
&a2=2&
&a3=3&
&a4=4&
now in the flash file:
in the first frame on stage, code: loadVariables("data.txt", "_root");
then in a button on stage, the code:
on (press) {
_global.arrayData = new Array();
for (var i = 1; i<=4; i++) {
var temp = eval("a"+i);
arrayData[i] = temp;
trace(arrayData[i]);
}
}
in the trace panel, the result is:
undefined
undefined
undefined
undefined
any help with that?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|