Code snippet: pass preloader flashvars to main swf

Needed some way generic way to get my flashvars from the preloader to the loaded swf

I just extend the url with the flashvars like this

private function addFlashvars(swfUrl:String):String{
	swfUrl += "?";
	for(var i:String in root.loaderInfo.parameters){
		swfUrl += i + "=" +root.loaderInfo.parameters[i] + "&";
	}
	return swfUrl;
}

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *