Array length

Hello…I’m having the following problem:


files = new Array();
lv = new LoadVars();
lv.onLoad = function() {
filelist = this.filelist;
files = filelist.split(",");
c = files.length-1;
for (a=0; a<c; a++) {
trace©;
}
};
lv.load(“a2.txt”);
total = c;

why is ‘total’ not getting the value of ‘c’? It should have the number of the length of the array…

if anybody can help?