Q:

Flash ActionScript Grab Query String Value

I need to grab values from the querystring and inject them into a getURL(""); snippet that's in the on (release) {} for a button.
So if the URL that contains the embedded swf is 
http://domain.com/player.html?returndomain=otherdomain.com
I'd like to get that otherdomain.com and inject it.  Something like
var returnUrl = "";
// do magic querystring getting
getURL(returnUrl);

*Edit: I need to snag the querystring because I don't have access to the embed code.  It's being rendered by a third party (Articulate) and loaded into a frame.  I do have access to the code that renders the frame html, which is why I figured query string would be the best route, and one button that's used in the presentation.
Note, I live in C# land, not ActionScript land so I most likely butchered the syntax.  I just need to get this button working as a one off and I'll probably never deal with it again.
BTW, I've seen the abdulqabiz QueryString object that's floating around out there but it kind of seems like overkill, like there should be something baked into the framework for this. I also lack the knowledge of how to incorporate this into my little button on (release) {} event

A:

You can get the query string like this:
import flash.external.ExternalInterface;
var queryString:String = String(ExternalInterface.call("function() { return window.location.search; }"));

For your example above, it would return "?returndomain=otherdomain.com", including the question mark.
this.loaderInfo.url, that is suggested in comments here, is ActionScript 3, in ActionScript 2 it would be this._url, and will give you the URL of the swf file, not the URL of the page.

