|
-
Protecting my flash embed
Hello,
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.
Thanks!
-
Dignitary
You can check to see what page the swf is embedded in with root.loaderInfo.url
Code:
if(root.loaderInfo.url!= "http:mywebsite.com"){
//do something else;
}
-
Prid - Outing
Taken from THIS THREAD, use this code on Frame 1:
- Actionscript 2.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
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.
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
-
.
Hi,
This will also decpiher the url it is being played from, no matter which directory it is in.
PHP Code:
var OurSite:String = "http://www.oursite.com";
if(_root._url.indexOf(OurSite) == -1 ){
getURL(OurSite, "_self");
}
any of these still do not prevent anybody from decompiling your work, for that you will need some form of obfuscator software
http://www.kindi.com/
-
Senior Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|