Web design and coding samples, free tools, tips and more..
Untitled Document

Posts Tagged ‘swf decompile’

PostHeaderIcon AS2 Domain Lock – Protecting SWF Files

Domain Locking is the simple way to protect your swf files at least from newbies. Here’s what i’ve found for domain locking. Just copy and paste this code into first frame;

urls_allowed = ["www.guidefordesign.com"];
sitelock(urls_allowed);
function sitelock(urls_allowed) {
lock = true;
domain_parts = _url.split(”://”);
real_domain = domain_parts[1].split(”/”);
domain.text = real_domain[0];
for (x in urls_allowed) {
if (urls_allowed[x] == real_domain[0]) {
lock = false;
}
}
if (lock) {
_root._alpha = 0;
}
}

for multiple domain lock just change the line above;

urls_allowed = ["www.guidefordesign.com","www.anotherdomain.com"];

source: emanueleferonato.com

  • Share/Bookmark

Search