/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
protect_me(); function protect_me(){ var allowed:Array = new Array("abc", "localhost", "127.0.0.1", "file://", "192.168.0.", "zoom", "envato"); var i=0; var sw=false; trace(loaderInfo.url.toString()); for(;i<allowed.length;i++){ if (loaderInfo.url.toString().indexOf(allowed[i]) > -1) sw=true; } trace(sw); if(sw==false) visible=false; }