home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 161 / MOBICLIC161.ISO / pc / DATA / DSS161 / DSS161_00 / DSS161_00.swf / scripts / dss161_00 / TestBox.as < prev   
Text File  |  2014-01-15  |  2KB  |  76 lines

  1. package dss161_00
  2. {
  3.    import dss161.engineaddons.facades.GameEngine;
  4.    import dss161.engineaddons.tools.debug.ATestBox;
  5.    
  6.    public class TestBox extends ATestBox
  7.    {
  8.        
  9.       
  10.       private var callback:Function;
  11.       
  12.       private var algo:CapsuleAlgo;
  13.       
  14.       public function TestBox(param1:GameEngine, param2:CapsuleAlgo)
  15.       {
  16.          super(param1);
  17.          this.algo = param2;
  18.          this.init();
  19.       }
  20.       
  21.       public function showModal(param1:Function) : void
  22.       {
  23.          this.callback = param1;
  24.          this.visible = true;
  25.       }
  26.       
  27.       private function init() : void
  28.       {
  29.          visible = false;
  30.          buttons = [{
  31.             "name":"BTN_DESTROY",
  32.             "label":"BTN_DESTROY"
  33.          },{
  34.             "name":"BTN_PERFORM",
  35.             "label":"BTN_PERFORM"
  36.          },{
  37.             "name":"BTN_PAUSE",
  38.             "label":"PAUSE"
  39.          },{
  40.             "name":"BTN_NEXT",
  41.             "label":"BTN_NEXT"
  42.          }];
  43.          onClick = function(param1:Object):void
  44.          {
  45.             switch(param1.name)
  46.             {
  47.                case "BTN_PERFORM":
  48.                   Performer.list();
  49.                   break;
  50.                case "BTN_DESTROY":
  51.                   game.config.APP.destroy();
  52.                   break;
  53.                case "BTN_NEXT":
  54.                   game.mainAlgo.jeu.next();
  55.             }
  56.          };
  57.          onRollOver = function(param1:String):void
  58.          {
  59.             switch(param1)
  60.             {
  61.                case "BTN_PAUSE":
  62.                   game.config.APP.sleep();
  63.             }
  64.          };
  65.          onRollOut = function(param1:String):void
  66.          {
  67.             switch(param1)
  68.             {
  69.                case "BTN_PAUSE":
  70.                   game.config.APP.wake();
  71.             }
  72.          };
  73.       }
  74.    }
  75. }
  76.