New to the forum and a "here-and-there" user of flash whenever a project commands it. I was wondering if you guys know the best way to protect my flash embed from being stolen and used on another site.
Basically we have a unique project that we don't want people embedding all on their site and have to come to us to view it. Last time we launched a similar project it went viral, but to the point that people were embedding it on their site having us lose vital page views. We credit our work and do link to our page through the project but I want us to be the only place it can be viewed.
I don't know if this is possible in flash or actually how I embed it. I use a content management system for our site that does not play friendly with certain codes (javascript for example) but open to any ideas.
// say, if your website's full URL path is:
// http://www.mywebsite.com/
// only type your website's name + the country code, like below
yourWebsite = "mywebsite.com";
myURL = flash.external.ExternalInterface.call("function(){ return window.location.href; }");
basename = myURL.split("/");
if(basename[2] != yourWebsite && basename[2] != "www."+yourWebsite){
i = 0;
while(i == 0){
// crash
}
unloadMovie(this);
}
- Actionscript 3.0 -
Code:
// say, if your website's full URL path is:
// http://www.mywebsite.com/
// only type your website's name + the country code, like below
var yourWebsite:String = "mywebsite.com";
var myURL:String = flash.external.ExternalInterface.call("function(){ return window.location.href; }");
var basename:Array = myURL.split("/");
if(basename[2] != yourWebsite && basename[2] != "www."+yourWebsite){
var i = 0;
while(i == 0){
// crash
}
stage.removeChild(root);
}
It's the same as rynoe's, but a bit extended. For simplicity, use his code, but note that loaderInfo.url will not only return the URL to your website, but if it's located inside a sub-folder or something, then that will be included in the URL.
17 Years old boy, who loves the Computer Technology
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
yes, with the right tool it is very (and I mean VERY) easy to replace urls in all the examples above without any decompiling/recompiling mess. so if you have "mywebsite.com" in plain text there, no obfuscation software will help you