1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| loadTableau = function(lien, cible){
table = new LoadVars ();
table.load(lien);
table.onLoad = function(success){
for (i in table){
j=0;
if (table[i].charAt(0)=="["){
temp = "tabl";
_root["t"+i]=new Array();
for (k=1 ; k<=table[i].length-1 ; k++){
if (table[i].charAt(k)=="," || table[i].charAt(k)=="]"){
r.text=texte;
_root["t"+i][j] = texte;
texte="";
j++;
}else{
texte = texte+table[i].charAt(k);
}
}
_root._root[i] = _root["t"+i];
}
if (temp != "tabl") {
_root._root[i] = table[i];
}
}
};
}; |