dynamically read data from a txt document
I try to dynamically read data from a txt document
in swf
stop ();
var pafh=this;
import flash.events.*;
var Araray_id:Array =new Array();
var v_length:Number;
var myTextLoader:URLLoader = new URLLoader();
myTextLoader.dataFormat=URLLoaderDataFormat.VARIABLES;
myTextLoader.addEventListener(Event.COMPLETE, onLoaded);
function onLoaded(e:Event):void {
Araray_id = e.target.data.araray_id.split(",");
trace("Araray_id: "+Araray_id);
v_length=Araray_id.length;
trace("v_length: "+v_length);
for (var i:Number=0;i<v_length;i++){
pafh["Id_"+i]=new Array();
trace("pafh[Id_+i]: "+pafh["Id_"+i]);
var v_help:Object="id_"+i;
trace("v_help: "+v_help);
//pafh["Id_"+i]= e.target.data.v_help.split(",");????? Here stops the script
//pafh["Id_"+i]= e.target.data.(v_help).split(",");????Here stops the script
//pafh["Id_"+i]= e.target.data.[v_help].split(","); ????Here stops the script
}
play();
}
myTextLoader.load(new URLRequest("myText1.txt"));
-------------------------------------------------------
in text
araray_id=aa,bb,cc,dd,ee,ff
&id_0=aa1,aa2,aa3,aa4
&id_1=bb1,bb2,bb3,bb4,bb5
&id_2=cc1,cc2,cc3
&id_3=dd1,dd2,dd3,dd4,dd5,dd6
&id_4=ee1,ee2
&id_5=ff1,ff2
-------------------------------------------------------
output
Araray_id: aa,bb,cc,dd,ee,ff
v_length: 6
pafh[Id_+i]:
v_help: id_0
TypeError: Error #1010: A term is undefined and has no properties.
at skuskaceatarraybiforas3fromtext_fla::MainTimeline/onLoaded()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
Can you help me with this problem