Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package {
- import net.flashpunk.Engine;
- import net.flashpunk.FP;
- import worlds.*;
- [SWF(width = "800", height = "600")]
- public class LD extends Engine {
- public function LD() {
- super(400, 300);
- FP.screen.scale = 2;
- FP.screen.color = 0x000000;
- }
- override public function init():void {
- trace("LUDUMDARE 20 GAME IS GO!");
- //FP.console.enable();
- //var allowed_site:String = "natpat.hostoi.com";
- var allowed_site:String = "flashgamelicense.com";
- //var allowed_site:String = "newgrounds.com";
- var domain:String = this.root.loaderInfo.url.split("/")[2];
- trace(domain);
- var domain_idx:int = domain.indexOf(allowed_site);
- if ((domain_idx != -1 && domain_idx == (domain.length - allowed_site.length)) || domain == "") {
- trace("I am here");
- FP.world = new StartScreen();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement