home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 127 / MOBICLIC127.ISO / mac / DATA / DSS127 / DSS127_03 / DSS127_03.swf / scripts / frame_480 / DoAction.as
Text File  |  2010-09-13  |  4KB  |  130 lines

  1. gereTextes.masqueLM({codeLM:"LM06_02"});
  2. gereTextes.masqueLM({codeLM:"LM06_03"});
  3. gereTextes.masqueLM({codeLM:"LM06_04"});
  4. swfStocker["A_" + gModuleName + "_WIKI_FUTUR"]._visible = 0;
  5. stop();
  6. if(getPos(listPlanets,0) == -1)
  7. {
  8.    gotoAndStop("06_FIN_A");
  9. }
  10. else
  11. {
  12.    nbDrags = 1;
  13.    listCible = ["ZONE_06_02","ZONE_06_03","ZONE_06_04"];
  14.    dragClip = "ZONE_06";
  15.    var i = 1;
  16.    while(i <= nbDrags)
  17.    {
  18.       this[dragClip + "_" + gimme2digits(i)].pDrag = i;
  19.       this[dragClip + "_" + gimme2digits(i)].onRollOver = function()
  20.       {
  21.          this.useHandCursor = 0;
  22.          if(_root.drag == undefined)
  23.          {
  24.             this.useHandCursor = 1;
  25.             gereCursor(3);
  26.             this.gotoAndStop("E2");
  27.          }
  28.       };
  29.       this[dragClip + "_" + gimme2digits(i)].onRollOut = function()
  30.       {
  31.          if(_root.drag == undefined)
  32.          {
  33.             gereCursor(1);
  34.             this.gotoAndStop("E1");
  35.          }
  36.       };
  37.       this[dragClip + "_" + gimme2digits(i)].onPress = function()
  38.       {
  39.          if(_root.drag == undefined)
  40.          {
  41.             gereCursor(1);
  42.             this.gotoAndStop("E1");
  43.             _root.drag = this.pDrag;
  44.             this.origX = this._x;
  45.             this.origY = this._y;
  46.             this.diffX = _root._xmouse - this._x;
  47.             this.diffY = _root._ymouse - this._y;
  48.             this.origDepth = this.getDepth();
  49.             this.swapDepths(15050);
  50.          }
  51.       };
  52.       this[dragClip + "_" + gimme2digits(i)].onRelease = this[dragClip + "_" + gimme2digits(i)].onReleaseOutside = function()
  53.       {
  54.          this.swapDepths(this.origDepth);
  55.          if(_root.foundDrop == undefined)
  56.          {
  57.             joueBruitage({nomSon:"B_NO"});
  58.             this._x = this.origX;
  59.             this._y = this.origY;
  60.          }
  61.          else
  62.          {
  63.             listPlanets[foundDrop] = 1;
  64.             switch(foundDrop)
  65.             {
  66.                case 0:
  67.                   _root.gotoAndStop("06_02_A");
  68.                   break;
  69.                case 1:
  70.                   _root.gotoAndStop("06_03_A");
  71.                   break;
  72.                case 2:
  73.                   _root.gotoAndStop("06_04_A");
  74.             }
  75.          }
  76.          _root.drag = undefined;
  77.       };
  78.       this[dragClip + "_" + gimme2digits(i)].onEnterFrame = function()
  79.       {
  80.          if(_root.drag == this.pDrag)
  81.          {
  82.             this._x = _root._xmouse - this.diffX;
  83.             this._y = _root._ymouse - this.diffY;
  84.             if(this._x < -85)
  85.             {
  86.                this._x = -85;
  87.             }
  88.             else if(this._x > 628)
  89.             {
  90.                this._x = 628;
  91.             }
  92.             if(this._y < 75)
  93.             {
  94.                this._y = 75;
  95.             }
  96.             else if(this._y > 468)
  97.             {
  98.                this._y = 468;
  99.             }
  100.             _root.foundDrop = undefined;
  101.             var _loc3_ = 0;
  102.             while(_loc3_ < _root.listCible.length)
  103.             {
  104.                if(_root[_root.listCible[_loc3_]].hitTest(this._x + 88,this._y + 67,1))
  105.                {
  106.                   switch(_loc3_)
  107.                   {
  108.                      case 0:
  109.                         this.gotoAndStop("E3");
  110.                         break;
  111.                      case 1:
  112.                         this.gotoAndStop("E4");
  113.                         break;
  114.                      case 2:
  115.                         this.gotoAndStop("E5");
  116.                   }
  117.                   _root.foundDrop = _loc3_;
  118.                }
  119.                _loc3_ = _loc3_ + 1;
  120.             }
  121.             if(foundDrop == undefined)
  122.             {
  123.                this.gotoAndStop("E2");
  124.             }
  125.          }
  126.       };
  127.       i++;
  128.    }
  129. }
  130.