Converting simple AS1 to AS3

Hello, this is my first post. Thanks very much for this forum and for any answers in advance. I’ve had a search around and found that its not possible to automatically convert AS1 to AS3, so I was wondering if I could get some help converting the following code. This is the last piece of the puzzle in my flash game - then its complete.

The code is designed to load the high scores table which is based in XML.
I’d really appreciate some help or advice.

Thanks again - Tom




	rootPath = this;
	
	// -----
	// ----- function to load PHP content in and process results
	// -----
	function loadPHP (filename, nextFunction) {
		trace("loadPHP");
		contentPHP = new LoadVars ();
		contentPHP.ignoreWhite = true;
		contentPHP.onLoad = function (success) {
			if (success) {
				delete this.onLoad;
				onEnterFrame = function () {
					if ((contentPHP.getBytesLoaded() == contentPHP.getBytesTotal()) && (contentPHP.loaded)) {
						delete this.onEnterFrame;
						PHPLoaded(nextFunction);
					}
				}
			} else {
				errorFunction();
			}
		}
		//contentPHP.ignoreWhite = true;
		contentPHP.load(filename);
	}
	// ----- function to process the results
	function PHPLoaded (nextFunction) {
		trace("PHPLoaded");
		for(prop in contentPHP) {
			_root[prop] = contentPHP[prop];
		}
		// ----- do next function
		nextFunction();
	}
	
	// ----- function to load XML content in
	function loadXML (filename, nextFunction) {
		// ----- load in XML
		trace("loadXML");
		contentXML = new XML ();
		contentXML.onLoad = function (success) {
			if (success) {
				delete this.onLoad;
				onEnterFrame = function () {
					if ((contentXML.getBytesLoaded() == contentXML.getBytesTotal()) && (contentXML.loaded)) {
						delete this.onEnterFrame;
						XMLLoaded(nextFunction);
					}
				}
			} else {
				errorFunction();
			}
		}
		contentXML.ignoreWhite = true;
		contentXML.load(filename);
	}
	// ----- function to process the XML
	function XMLLoaded (nextFunction) {
		trace("XMLLoaded");
		// ----- do next function
		nextFunction();
	}