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

  1. function commentFiniLocal()
  2. {
  3.    trace("comment fini local");
  4.    if(_root.expression)
  5.    {
  6.       stopExpression();
  7.    }
  8.    else if(_root.sonVocab != 0)
  9.    {
  10.       if(_root.listDone[_root.sonVocab - 1] == 0)
  11.       {
  12.          _root["ZONE_" + _root.sonVocab].gotoAndStop("E1");
  13.       }
  14.       else
  15.       {
  16.          _root["ZONE_" + _root.sonVocab].gotoAndStop("E3");
  17.       }
  18.       gereTextes.masqueIB();
  19.       _root.sonVocab = 0;
  20.       if(doneVocabSon == undefined)
  21.       {
  22.          if(getPos(_root.listDone,0) == -1)
  23.          {
  24.             doneVocabSon = 1;
  25.             joueSon({nomSon:"VOC"});
  26.          }
  27.       }
  28.    }
  29.    else if(gClicZap !== 0)
  30.    {
  31.       trace("OOOPS PLAY");
  32.       play();
  33.    }
  34. }
  35. function zonesEnE1()
  36. {
  37.    var _loc2_ = 1;
  38.    while(_loc2_ <= nbZones)
  39.    {
  40.       this["ZONE_" + gimme2digits(_loc2_)].gotoAndStop("E1");
  41.       _loc2_ = _loc2_ + 1;
  42.    }
  43. }
  44. if(doneIntro == undefined)
  45. {
  46.    doneIntro = 1;
  47.    joueSon({nomSon:"00",actionFin:"RIEN"});
  48. }
  49. VENDEUR.useHandCursor = 0;
  50. VENDEUR.onPress = function()
  51. {
  52. };
  53. LIZZ.useHandCursor = 0;
  54. LIZZ.onPress = function()
  55. {
  56. };
  57. gereTextes.masqueIB();
  58. BT_DIALOG.onRollOver = function()
  59. {
  60.    gereCursor(2);
  61.    this.gotoAndStop("E2");
  62.    joueBruitage({nomSon:"B_DIA"});
  63.    gereTextes.afficheIB({codeIB:"IB_DIA"});
  64. };
  65. BT_DIALOG.onRollOut = function()
  66. {
  67.    gereCursor(1);
  68.    this.gotoAndStop("E1");
  69.    stopBruitage({nomSon:"B_DIA"});
  70.    gereTextes.masqueIB();
  71. };
  72. BT_DIALOG.onPress = function()
  73. {
  74.    gereTextes.masqueIB();
  75.    _root.blockRolls = 1;
  76.    gereCursor(1);
  77.    this.gotoAndStop("E1");
  78.    stopBruitage({nomSon:"B_DIA"});
  79.    _root.gotoAndPlay("DIA_INTRO");
  80. };
  81. _root.sonVocab = 0;
  82. nbZones = 14;
  83. if(listDone == undefined)
  84. {
  85.    listDone = [];
  86.    var i = 1;
  87.    while(i <= nbZones)
  88.    {
  89.       listDone.push(0);
  90.       i++;
  91.    }
  92. }
  93. _root.blockRolls = 0;
  94. var i = 1;
  95. while(i <= nbZones)
  96. {
  97.    this["ZONE_" + gimme2digits(i)].pZone = i;
  98.    this["ZONE_" + gimme2digits(i)].pName = "ZONE_" + gimme2digits(i);
  99.    if(_root.vocabJeu == 1)
  100.    {
  101.       if(_root.listDone[i - 1] == 1)
  102.       {
  103.          this["ZONE_" + gimme2digits(i)].gotoAndStop("E3");
  104.       }
  105.    }
  106.    this["ZONE_" + gimme2digits(i)].onRollOver = function()
  107.    {
  108.       if(_root.sonVocab == 0 & _root.blockRolls == 0)
  109.       {
  110.          this.useHandCursor = 1;
  111.          gereCursor(2);
  112.          joueBruitage({nomSon:"B_" + this.pName.split("_")[1]});
  113.          this.gotoAndStop("E2");
  114.       }
  115.       else
  116.       {
  117.          this.useHandCursor = 0;
  118.       }
  119.    };
  120.    this["ZONE_" + gimme2digits(i)].onRollOut = function()
  121.    {
  122.       if(_root.sonVocab == 0 & _root.blockRolls == 0)
  123.       {
  124.          gereCursor(1);
  125.          stopBruitage({nomSon:"B_" + this.pName.split("_")[1]});
  126.          switch(_root.vocabJeu)
  127.          {
  128.             case 1:
  129.                if(_root.listDone[this.pZone - 1] == 0)
  130.                {
  131.                   this.gotoAndStop("E1");
  132.                }
  133.                else
  134.                {
  135.                   this.gotoAndStop("E3");
  136.                }
  137.                break;
  138.             case 2:
  139.                this.gotoAndStop("E1");
  140.          }
  141.       }
  142.       else
  143.       {
  144.          this.useHandCursor = 0;
  145.       }
  146.    };
  147.    this["ZONE_" + gimme2digits(i)].onPress = function()
  148.    {
  149.       gereCursor(1);
  150.       switch(_root.vocabJeu)
  151.       {
  152.          case 1:
  153.             if(_root.sonVocab == 0 & _root.blockRolls == 0)
  154.             {
  155.                _root.sonVocab = this.pName.split("_")[1];
  156.                var _loc3_ = "IB_T" + _root.sonVocab;
  157.                gereTextes.afficheIB({codeIB:_loc3_,X:_root._xmouse,Y:_root._ymouse + 20});
  158.                joueSon({nomSon:_root.sonVocab,actionFin:"commentFiniLocal"});
  159.                stopBruitage({nomSon:"B_" + this.pName.split("_")[1]});
  160.                _root.listDone[this.pZone - 1] = 1;
  161.                this.gotoAndStop("E3");
  162.             }
  163.             else
  164.             {
  165.                this.useHandCursor = 0;
  166.             }
  167.             break;
  168.          case 2:
  169.             if(_root.blockRolls == 0)
  170.             {
  171.                if(this.pName.split("_")[1] == gimme2digits(_root.gListMots[0]))
  172.                {
  173.                   _root.gScore += 1;
  174.                   _root.succes = 1;
  175.                }
  176.                else
  177.                {
  178.                   _root.succes = 0;
  179.                }
  180.                _root.blockRolls = 1;
  181.                this.gotoAndStop("e1");
  182.                stopBruitage({nomSon:"B_" + this.pName.split("_")[1]});
  183.                _root.gotoAndPlay("SUITE_JEU");
  184.             }
  185.       }
  186.    };
  187.    i++;
  188. }
  189. btn_jeu._visible = 1;
  190. btn_jeu.onRollOver = function()
  191. {
  192.    trace("ROLL " + _root.sonVocab + " " + _root.blockRolls);
  193.    if(_root.sonVocab == 0 & _root.blockRolls == 0)
  194.    {
  195.       this.useHandCursor = 1;
  196.       gereCursor(2);
  197.       var _loc3_ = "IB_DE";
  198.       gereTextes.afficheIB({codeIB:_loc3_,mc:this});
  199.       joueBruitage({nomSon:"B_DE"});
  200.       this.gotoAndStop(2);
  201.    }
  202. };
  203. btn_jeu.onRollOut = function()
  204. {
  205.    stopBruitage({nomSon:"B_DE"});
  206.    gereCursor(1);
  207.    gereTextes.masqueIB();
  208.    this.gotoAndStop(1);
  209. };
  210. btn_jeu.onPress = function()
  211. {
  212.    if(_root.sonVocab == 0 & _root.blockRolls == 0)
  213.    {
  214.       stopBruitage({nomSon:"B_DE"});
  215.       gereCursor(1);
  216.       gCommentOn.stop();
  217.       gereTextes.masqueIB();
  218.       _root.vocabJeu = 2;
  219.       _root.blockRolls = 1;
  220.       _root.gScore = 0;
  221.       zonesEnE1();
  222.       _root.gotoAndPlay("JEU");
  223.    }
  224. };
  225. btn_jeu.onReleaseOutside = function()
  226. {
  227.    if(_root.sonVocab == 0 & _root.blockRolls == 0)
  228.    {
  229.       gereCursor(1);
  230.       if(gCommentOn !== undefined)
  231.       {
  232.          stopSon(_root);
  233.       }
  234.       gereTextes.masqueIB();
  235.    }
  236. };
  237. stop();
  238.