Domain locking in AS3?

Is it still possible to do domain locking in AS3?

I tried the following:

var topUrl:String = (root.loaderInfo.url);

But it keeps giving me the url of the swf file instead of the page that it’s being loaded into.

Is there a new way of doing it? Thanks.