Use the LocalConnection object to get the domain name of the server where the Flash movie is located.
This will print out something like this:
var localDomainLC:LocalConneciton = new LocalConnection(); myDomainName = localDomainLC.domain(); trace( "My domain is " + myDomainName );
This will print out something like this:
My domain is example.com