Posted By

digitalzoomstudio on 07/30/11


Tagged

domain sniff as3 protection


Versions (?)

AS3 Domain Sniff


 / Published in: ActionScript 3
 

  1. protect_me();
  2. function protect_me(){
  3. var allowed:Array = new Array("abc", "localhost", "127.0.0.1", "file://", "192.168.0.", "zoom", "envato");
  4. var i=0;
  5. var sw=false;
  6. trace(loaderInfo.url.toString());
  7. for(;i<allowed.length;i++){
  8. if (loaderInfo.url.toString().indexOf(allowed[i]) > -1)
  9. sw=true;
  10. }
  11. trace(sw);
  12. if(sw==false)
  13. visible=false;
  14.  
  15. }

Report this snippet  

You need to login to post a comment.