ActionScript2.0 - txt 傳值給 Flash ,

var my_load:LoadVars;
my_load = new LoadVars();

my_load.onLoad
= function(success) {
  mydata1=my_load.var1; //var1 var2 就是接txt 檔裡的
&var1變數值
  mydata2=my_load.var2;
  show_txt();
}

function
show_txt(){
   
trace("file1--->var1"+mydata1);
trace("file1--->var1"+mydata2);
}

my_load.sendAndLoad("123.txt",my_load,"POST");

------------------------------------------------------------------------------
123.txt
內容

&var1=abcd123&var2=123

沒有留言:

張貼留言