Get current URL or Domain of current flash location

Get current URL or Domain of current flash location

ExternalInterface for Domain Name

/* -------- ExternalInterface for Domain Name ------- */
import flash.external.*;
var urlPath;
function geturlhttp() {
urlPath = ExternalInterface.call("window.location.href.toString");
}
geturlhttp();
trace(urlPath);

LocalConnection for Domain Name

/* -------- LocalConnection for Domain Name ------- */
import flash.net.LocalConnection;
var lc:LocalConnection = new LocalConnection();
var domain:String = lc.domain;
trace(domain);

You may also like...

Leave a Reply