Function return URLVariables?

Is there a way to return URLVariables from a function

eg:

function varsLoaded():[COLOR=Red]URLVariables[/COLOR] {
[COLOR=Blue]var[/COLOR] variables:URLVariables = new URLVariables();
variables.var1 = ‘string1’;
variables.var2 = ‘string2’;
[COLOR=Red]return[/COLOR] variables;
}

Now what I would like to do is assign “variables” to a variable:
[COLOR=Blue]var[/COLOR] theVar = varsLoaded();
trace(theVar.var1);

Obviously the code above isn’t correct; just to illustrate what I’m hoping to accomplish. Any help would be greatly appreciated.