var lv:LoadVars = new LoadVars(); lv.onData = function(content:String):Void{ if(content == undefined) trace ('Error load file') else trace(content); } lv.load('document.txt');