ActionScript: Protect your Flash games on the web, sitelock all your games.

Posted on 03:29 PM

If you want to submit your games on one game portals DO NOT UPLOAD YOUR GAMES WITHOUT A SITELOCK SCRIPT.


Your games can be “stolen” by game portals. Or if you didn’t finish your game it’s a really a “pain in the ass” to update your games spread on all the web.

I tried lot of code for sitelocking my games but some of them are in ActionScript 2.0 or totally out of date. Some of them can’t work with the “https” or without the “www” characters.
Another example when you to want to test your game on your local computer you have to comment the script. And you can forget to uncomment the sitelock script when you submit your game on the web.

So I decided to create my own script.

This is a short version of my script.
But this one is perfect for all uses.


Copy and Paste this code and add your domains into the array “[ ]” separated by commas :

[“”, …, …]

You can lock the local mode by adding a second parameter : false
The default value is set to true.