/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public function isStolen():Boolean { var _domain : String = (new LocalConnection()).domain; var _allowedDomainList : Array = new Array(); //------- add here all strings that would have to be found in allowed domain names --------o _allowedDomainList.push("localhost"); _allowedDomainList.push("domain1"); _allowedDomainList.push("domain2"); //--------------------------------------------o for (var i : Number = 0; i < _allowedDomainList.length; i++) { if (_domain.toLowerCase().indexOf(_allowedDomainList[i].toString().toLowerCase())>-1) { return false; } } return true; }