/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var vars:URLLoader = new URLLoader(); vars.dataFormat=URLLoaderDataFormat.VARIABLES; vars.addEventListener(Event.COMPLETE, onComplete, false, 0, true); vars.load(new URLRequest("vars.txt")); function onComplete(evt:Event):void { var urlVars:URLVariables=evt.target.data; for (var prop in urlVars) { trace("urlVars." + prop + " = " + urlVars[prop]); } }