Código :
on(release){ var chat_lv:LoadVars = new LoadVars(); chat_lv.onLoad = function(exito) { if (exito) { chat_txt.text = arreglarTexto(chat_lv.toString()); } else { chat_txt.text = "Error!! :("; } }; function arreglarTexto(texto_str:String):String { texto_str = unescape(texto_str); return texto_str.substr(0, texto_str.length-24); } chat_lv.load("Chat.txt"); }
Pero lo que quiero conseguir es que cada vez que se pulse el boton, el loadvars cambie de nombre, por ejemplo: clat_lv1, Chat_lv2, Chat_lv3...
He echo este codigo:
Fuera del boton:
Código :
Refresh = 1;
En el boton:
Código :
on(release){ ++refresh ver.text = refresh; var chat_lv + refresh:LoadVars = new LoadVars(); chat_lv + refresh.onLoad = function(exito) { if (exito) { chat_txt.text = arreglarTexto(chat_lv + refresh.toString()); } else { chat_txt.text = "Error!! :("; } }; function arreglarTexto(texto_str:String):String { texto_str = unescape(texto_str); return texto_str.substr(0, texto_str.length-24); } chat_lv + refresh.load("Chat.txt"); }
Y no funciona, también he provado de cambiar "Chat_lv + Refresh" por "resfresh" solo, pero tampoco funciona
Como puedo hacer esto?
Gracias.