Return to Snippet

Revision: 25974
at April 15, 2010 05:39 by adrianparr


Initial Code
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]);
	}
}

Initial URL

                                

Initial Description

                                

Initial Title
AS3 Loading Variables from an External Text File

Initial Tags
text, load

Initial Language
ActionScript 3