home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 136 / MOBICLIC136.ISO / pc / DATA / DCV136 / DCV136_00 / DCV136_00.swf / scripts / frame_136 / DoAction.as
Text File  |  2011-07-20  |  2KB  |  78 lines

  1. function initQuestion(lQuestion)
  2. {
  3.    question = lQuestion;
  4.    question2D = gimme2digits(lQuestion);
  5.    listZones = ["R" + question2D + "_01","R" + question2D + "_02","R" + question2D + "_03"];
  6.    var _loc4_ = 0;
  7.    while(_loc4_ <= listZones.length)
  8.    {
  9.       this[listZones[_loc4_]].pZone = _loc4_ + 1;
  10.       this[listZones[_loc4_]].onRollOver = function()
  11.       {
  12.          gereCursor(2);
  13.          this.gotoAndStop("E2");
  14.          joueBruitage({nomSon:"B_" + question2D + "_" + gimme2digits(this.pZone)});
  15.          gereTextes.afficheIB({codeIB:"IB_" + question2D + "_" + gimme2digits(this.pZone),X:_root._xmouse,Y:_root._ymouse});
  16.       };
  17.       this[listZones[_loc4_]].onRollOut = function()
  18.       {
  19.          gereCursor(1);
  20.          this.gotoAndStop("E1");
  21.          stopBruitage({nomSon:"B_" + question2D + "_" + gimme2digits(this.pZone)});
  22.          gereTextes.masqueIB();
  23.       };
  24.       this[listZones[_loc4_]].onPress = function()
  25.       {
  26.          gereCursor(1);
  27.          this.gotoAndStop("E1");
  28.          stopBruitage({nomSon:"B_" + question2D + "_" + gimme2digits(this.pZone)});
  29.          gereTextes.masqueIB();
  30.          switch(this.pZone)
  31.          {
  32.             case 1:
  33.             case 2:
  34.                _root.gotoAndStop("_" + question2D + "_BAD");
  35.                break;
  36.             case 3:
  37.                _root.nbBonReponses += 1;
  38.                _root.gotoAndStop("_" + question2D + "_GOOD");
  39.          }
  40.          _global.HOTE[gNomListeVu][_root.question - 1] = 1;
  41.          trace("_global.HOTE[gNomListeVu] " + _global.HOTE[gNomListeVu]);
  42.       };
  43.       _loc4_ = _loc4_ + 1;
  44.    }
  45. }
  46. function timber()
  47. {
  48.    joueBruitage({nomSon:"B_PAF"});
  49.    this["ARBRE_" + question2D].gotoAndStop("E2");
  50. }
  51. function bucheron3()
  52. {
  53.    this["BUCHERON_" + question2D].gotoAndStop("E3");
  54.    SINGE.gotoAndStop("E3");
  55.    joueSon({nomSon:nom_du_son,actionFin:"suiteReponse"});
  56. }
  57. function coco()
  58. {
  59.    joueBruitage({nomSon:"B_BONG"});
  60. }
  61. function bucheron5()
  62. {
  63.    this["BUCHERON_" + question2D].gotoAndStop("E5");
  64.    SINGE.gotoAndStop("E4");
  65.    joueSon({nomSon:nom_du_son,actionFin:"suiteReponse"});
  66. }
  67. function suiteReponse()
  68. {
  69.    SINGE.gotoAndStop("E1");
  70.    gotoAndStop("_" + question2D + "_01");
  71. }
  72. var nom_du_son = "Q01";
  73. teste_quiz(3);
  74. joueSon({nomSon:nom_du_son,actionFin:"stopSinge"});
  75. stop();
  76. nbBonReponses = 0;
  77. initQuestion(1);
  78.