Sitelock to NG
- MichaelJ
-
MichaelJ
- Member since: Mar. 2, 2009
- Offline.
-
- Forum Stats
- Member
- Level 18
- Voice Actor
What is the AS2 code to sitelock a game to Newgrounds? I forgot how to write it. Thanks.
- StaliN98
-
StaliN98
- Member since: Jul. 27, 2007
- Offline.
-
- Forum Stats
- Member
- Level 10
- Blank Slate
var url:String = this._url;
url = url.substring( 11, 21 );
if( url != "newgrounds" ){
// Do something
}
Should work. Just put it at the top of your code on the first frame. Make it do something like show a graphic saying "This has been ripped from newgrounds.com" etc.
- MichaelJ
-
MichaelJ
- Member since: Mar. 2, 2009
- Offline.
-
- Forum Stats
- Member
- Level 18
- Voice Actor
It doesn't work when I test movie, will it work when on the internet?
- StaliN98
-
StaliN98
- Member since: Jul. 27, 2007
- Offline.
-
- Forum Stats
- Member
- Level 10
- Blank Slate
At 7/16/09 09:15 AM, Animator1mike wrote: It doesn't work when I test movie, will it work when on the internet?
By "doesn't work", do you mean the movie won't work because this code stops it or the code I supplied doesn't work? The code worked when I tested it.


