Do/while loop to fill an array until all the variables have been loaded

OK I figured that I could possibly do a do/while loop until all of the variables in my text file are loaded. My question is, what condition would be used to keep the loop going until all the variables have been loaded? The variables would have a name like var1, var2, var3, etc…

Use the Loadvars object. =)
[AS]myLoadVars = new LoadVars();
myLoadVars.onLoad = function(success) {
if (success) {
// file loaded correctly
// some actions here
} else {
// error loading file
// some actions there