Returning variable from class

Hi

I’m trying to simplify my code by repeated stuff to classes.

var rtn:String = licenseCheck(paramObj.sugar,localURL);

Sends to the following class, with the idea of returning returnStr at the end.

package couk.me.od
{
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.net.*;
	
	public class licenseCheck extends Sprite
	{
		
		static public var localURLreq:URLRequest = new URLRequest("http://www.google.com/odRem/odRem.cfm");
		static public var localURL:String = "";
		static public var returnStr:String = "empty";
		
		public function licenseCheck(sweetener:String,localURLin:String) {
			localURL = localURLin;
			
			var variables:URLVariables = new URLVariables();
			variables.sugar = sweetener;
			
			localURLreq.method = URLRequestMethod.POST;
			localURLreq.data = variables;
			
			var loader:URLLoader = new URLLoader();
			loader.addEventListener(Event.CONNECT, checkingLicense);
			loader.addEventListener(Event.COMPLETE, onLicenseChecked);
			loader.load(localURLreq);
		}
		
		
		private function checkingLicense(event:Event):void {
			returnStr = "still checking license...";
		}
		
		private function onLicenseChecked(evt:Event):String {
			
			if (String(evt.target.data) != "no") {
				var retStr:String = String(evt.target.data);
				var spaceless:String = stringFuncs.stripSpaces(retStr);
				var comStr:String = String(localURL).toLowerCase();
				if (comStr.indexOf(spaceless) != -1) {
					// loads designer if successful
					//loadDesigner(1);
					returnStr = "license is correct";
				} else {
					returnStr = comStr + " " + retStr +  " Please check your license domain is correct";
				}	
			} else {
				returnStr = "Please check your license domain is correct";
			}
			
			return returnStr
		}
		
	}
}

But this creates two errors

1067: Implicit coercion of a value of type couk.me.od:licenseCheck to an unrelated type String.

1137: Incorrect number of arguments. Expected no more than 1. designerAppMain.as

Please could someone point me in the right direction for how I could change my class

Thanks
David