开发者

flash simple protection

开发者 https://www.devze.com 2023-04-11 08:51 出处:网络
I need to protect the Fla (swf) I have created and tha I am hosting so it can be run ONLY from mydomain.

I need to protect the Fla (swf) I have created and tha I am hosting so it can be run ONLY from mydomain.

It means: if someone copy the swf to HIS domain, the flash will not work.

Any idea how 开发者_如何学Goto do it ?


This can be decompiled and removed but its just another layer of security you can add that will crash the app if not on allowed domain(s)

var lc:LocalConnection = new LocalConnection();
switch ( lc.domain ){
  case "mysubdomain.mydomain.com":
    break;
  case "anydomainallowed.com":
    break;
  default:
    var i:int = 0;
    while(0){
      i += i;
    }
}


Depending on what kind of web server you're hosting on, you can restrict users from accessing your .swf file (or the complete .swf file type) outside of the domain it's being hosted on.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号