AS: MAIN. did bedn steal that too?
alright. in response to the anti-ebaum mass-hysteria, ive decided to write this modification of liljim's swf protection code. this is really an expansion to the original AS: SWF Copy Protection; a specific answer to a general question.
NOTE: please keep this thread on topic. if you would like to discuss how ebaum stole the internets, or some other off-topic banter, please refer to the parent thread. this is a place for tutorial-related talk only.
RAW CODE:
stop();
Stage.showMenu= false;
this_url = _root._url;
bad_urls = new Array("ebaum", "ebaumsworld", "rodim", "coolscifi", "dodirectory", "crazy-laberecke", "suprvibes", "simplyro", "40plusarcade", "adventurers-united", "uaenexus", "trackpads", "jl-planet", "rugbyrefs", "spamvault", "necrotania", "loafersparadise", "princejupiter", "johnstownchiefs", "nacros", "suprvibes", "footles", "f4g", "differentdawn", "brentfordalways", "wass-up", "movieloversparadise", "fruit-emu", "usuallygames", "1juegos", "julala", "topsites", "freegame365", "freegames365", "revier.co.uk", "bypassbrowser", "ianag", "freegames365", "in4.pl", "webgames", "gameportalonline", "juegosagogo", "freeonlinegames", "funflashgames", "roffles", "onlinegames", "minijuegos", ".games.gr", "millionsofgames", "juegosagogo", "funflashgames", "technorati", "kbcafe", "gametopia", "70.85.116.68", "briankass", "ianag", "limk", "indi.ru");
for (var i = 0; i<bad_urls.length; i++) {
if (this_url.indexOf(bad_urls[i])!=-1) {
gotoAndStop("bad");
}
}
__________________________________________
________
USAGE AND WHATNOT:
Stage.showMenu= false;
this_url = _root._url;
the stage right-click menu is disabled, preventing the use of playback controls such as next and play, which would render this code useless. the location in which the swf is hosted is then stored to the variable this_url.
bad_urls = new Array( [STRING DATA] );
this is a customized list (full list above) of sites that are suspected or accused of swf theft. this list is by no means all-inclusive or absolute. simply add more strings to block other sites, or remove strings that you wish to trust.
for (var i = 0; i<bad_urls.length; i++) {
if (this_url.indexOf(bad_urls[i])!=-1) {
gotoAndStop("bad");
}
}
this is the important part of the script. a loop begins, running through each value of the array and testing it against the this_url variable. if the string is not found in the variable, the indexOf() property returns a -1. if, however, the string is found in the variable, an index location, beginning with 0, is returned.
the actual actions taken when the string is identified is up to customization. the most common, and in this case, the shown way, is to send the playhead to a uniquely named frame ("bad"), where a stop(); command should be, rendering further playback of the swf impossible.
