home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 136 / MOBICLIC136.ISO / pc / DATA / ENG136 / ENG136_00 / ENG136_00.swf / scripts / frame_245 / DoAction.as
Text File  |  2011-07-20  |  1KB  |  45 lines

  1. trace("STOP LIZZ PLEASE");
  2. LIZZ.gotoAndStop("E2");
  3. btn_relance.onRollOver = function()
  4. {
  5.    gereCursor(2);
  6.    joueBruitage({nomSon:"B_DE"});
  7.    this.gotoAndStop(2);
  8. };
  9. btn_relance.onRollOut = function()
  10. {
  11.    gereCursor(1);
  12.    stopBruitage({nomSon:"B_DE"});
  13.    this.gotoAndStop(1);
  14. };
  15. btn_relance.onPress = function()
  16. {
  17.    gereCursor(1);
  18.    stopBruitage({nomSon:"B_DE"});
  19.    _root.gSerie += 1;
  20.    if(_root.gSerie > Math.floor(nbZones / 5))
  21.    {
  22.       listBase = [];
  23.       var _loc2_ = 1;
  24.       while(_loc2_ <= nbZones)
  25.       {
  26.          listBase.push(_loc2_);
  27.          _loc2_ = _loc2_ + 1;
  28.       }
  29.       _root.gListMots = [];
  30.       _loc2_ = 0;
  31.       while(_loc2_ < nbZones)
  32.       {
  33.          lElement = _root.randomValue(0,listBase.length - 1);
  34.          _root.gListMots.push(listBase[lElement]);
  35.          listBase.splice(lElement,1);
  36.          _loc2_ = _loc2_ + 1;
  37.       }
  38.       _root.gSerie = 1;
  39.    }
  40.    _root.gMot = 1;
  41.    _root.gScore = 0;
  42.    _root.gotoAndPlay("ATTENTE");
  43. };
  44. stop();
  45.