System.useCodepage = true;//防止乱麻
var my_lv:LoadVars = new LoadVars();//声明一个LoadVars
var a_txt:String = "=&onLoad=[type Function]";//用这种方法,末尾总是多出来这些字符
var con_txt:String = "";
function mycontent(last_txt:String, main_txt:String, txtarea:Object):Void {//自定义函数,从读出的字符中清除末尾的last_txt,并且将内容在组件TextArea中出现
main_txt = main_txt.substr(0, (main_txt.length-last_txt.length));
txtarea.text = main_txt;
}
my_lv.load("tt.txt");
my_lv.onLoad = function(ee) {
if (ee) {
con_txt = unescape(my_lv.toString());
mycontent(a_txt, con_txt, mytxt);
}
};
var my_lv:LoadVars = new LoadVars();//声明一个LoadVars
var a_txt:String = "=&onLoad=[type Function]";//用这种方法,末尾总是多出来这些字符
var con_txt:String = "";
function mycontent(last_txt:String, main_txt:String, txtarea:Object):Void {//自定义函数,从读出的字符中清除末尾的last_txt,并且将内容在组件TextArea中出现
main_txt = main_txt.substr(0, (main_txt.length-last_txt.length));
txtarea.text = main_txt;
}
my_lv.load("tt.txt");
my_lv.onLoad = function(ee) {
if (ee) {
con_txt = unescape(my_lv.toString());
mycontent(a_txt, con_txt, mytxt);
}
};
回复Comments
作者:
{commentrecontent}