Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. package {
  2.  
  3. import net.flashpunk.Engine;
  4. import net.flashpunk.FP;
  5. import worlds.*;
  6. [SWF(width = "800", height = "600")]
  7.  
  8. public class LD extends Engine {
  9.  
  10. public function LD() {
  11. super(400, 300);
  12. FP.screen.scale = 2;
  13. FP.screen.color = 0x000000;
  14. }
  15.  
  16. override public function init():void {
  17. trace("LUDUMDARE 20 GAME IS GO!");
  18. //FP.console.enable();
  19. //var allowed_site:String = "natpat.hostoi.com";
  20. var allowed_site:String = "flashgamelicense.com";
  21. //var allowed_site:String = "newgrounds.com";
  22. var domain:String = this.root.loaderInfo.url.split("/")[2];
  23. trace(domain);
  24. var domain_idx:int = domain.indexOf(allowed_site);
  25. if ((domain_idx != -1 && domain_idx == (domain.length - allowed_site.length)) || domain == "") {
  26. trace("I am here");
  27. FP.world = new StartScreen();
  28. }
  29.  
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement