home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Puzzle / HexiomConnect.swf / scripts / Links.as < prev    next >
Text File  |  2008-08-29  |  2KB  |  68 lines

  1. package
  2. {
  3.    import flash.display.Stage;
  4.    import flash.events.Event;
  5.    import flash.external.ExternalInterface;
  6.    import flash.net.URLRequest;
  7.    import flash.net.navigateToURL;
  8.    
  9.    public class Links
  10.    {
  11.       
  12.       private static var submittedMochibot:Boolean = false;
  13.       
  14.       public static var stage:Stage;
  15.        
  16.       
  17.       public function Links()
  18.       {
  19.          super();
  20.       }
  21.       
  22.       public static function sponsorLink(param1:Event = null) : void
  23.       {
  24.          if(!submittedMochibot)
  25.          {
  26.             submittedMochibot = true;
  27.             trace("Submit Mochibot");
  28.             MochiBot.track(stage,"24287def");
  29.          }
  30.          openURL("http://www.kongregate.com/?gamereferral=hexiomconnect");
  31.       }
  32.       
  33.       public static function unlockLink(param1:Event = null) : void
  34.       {
  35.          if(!submittedMochibot)
  36.          {
  37.             submittedMochibot = true;
  38.             trace("Submit Mochibot");
  39.             MochiBot.track(stage,"24287def");
  40.          }
  41.          openURL("http://www.kongregate.com/games/moonkey/hexiom-connect/?gamereferral=hexiomconnect\t\t");
  42.       }
  43.       
  44.       public static function rigLink(param1:Event = null) : void
  45.       {
  46.          openURL("http://rig.newgrounds.com/");
  47.       }
  48.       
  49.       public static function biclopsLink(param1:Event = null) : void
  50.       {
  51.          openURL("http://www.biclopsgames.com");
  52.       }
  53.       
  54.       public static function openURL(param1:String) : void
  55.       {
  56.          var url:String = param1;
  57.          try
  58.          {
  59.             ExternalInterface.call("window.open",url,"_blank","");
  60.          }
  61.          catch(error:Error)
  62.          {
  63.             navigateToURL(new URLRequest(url),"_blank");
  64.          }
  65.       }
  66.    }
  67. }
  68.