myVars = new LoadVars (); myVars.onLoad = function (success:Boolean) { if (success) { trace ("variables loaded"); trace ('onLoad: ' + this.var1); } else { //trace( 'could not lad variables' ); loading (); } }; myVars.load ('vars.txt');