Return to Snippet

Revision: 11959
at February 25, 2009 12:35 by ddegner


Initial Code
import flash.external.ExternalInterface;
var fullurl:String = ExternalInterface.call("window.location.href.toString");


if(fullurl){
	var params:Array = fullurl.split('?');
	fullurl = params[1];
	params = fullurl.split('&');
	var length:uint = params.length;
	var g:uint;
	for (g=0; g< length; g++){
		var index:int=0;
		var kvPair:String = params[g];
		if((index = kvPair.indexOf("=")) > 0){
			var key:String = kvPair.substring(0,index);
			var value:String = kvPair.substring(index+1);
			params[key] = value;
		}
	}
}

Initial URL
www.DegnerWeddings.com

Initial Description
It's not the prettiest piece of code but it works for now

Initial Title
Pull query-string variables from the loading files URL

Initial Tags
url

Initial Language
ActionScript 3