home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 136 / MOBICLIC136.ISO / pc / DATA / DSS136 / DSS136_03 / DSS136_03.swf / scripts / frame_60 / DoAction.as
Text File  |  2011-07-20  |  2KB  |  87 lines

  1. function lanceExp()
  2. {
  3.    _root.gotoAndStop("ATTENTE");
  4. }
  5. function finSonQuiz()
  6. {
  7.    if(swfHolder_ !== undefined)
  8.    {
  9.       swfHolder_.removeMovieClip();
  10.    }
  11.    swfHolder.removeMovieClip();
  12.    gotoAndStop("ATTENTE");
  13. }
  14. stop();
  15. joueSon({nomSon:"98",actionFin:"RIEN",mcCible:"ONCLE",mcLabelIn:"E2",mcLabelOut:"E1"});
  16. gereTextes.afficheLM({mc:_root.LM,codeLM:"LM_Q" + gAnimNum});
  17. var myID = "A_" + gModuleName + "_ANIM_Q_" + gAnimNum;
  18. afficheSwf(myID,ZONE_ANIM.ACCUEIL);
  19. var XmlLM = this.moduleInfo.returnNodeByPath("Module." + gLangue + ".LegendesMedias");
  20. var lList = ["A","B","C","D","E"];
  21. i = 4;
  22. while(i >= 0)
  23. {
  24.    if(gereTextes.getTextById(XmlLM,"LM_R" + gAnimNum + lList[i]) == undefined)
  25.    {
  26.       lList.splice(i,1);
  27.    }
  28.    i--;
  29. }
  30. gListeReponse = randomiseList(lList);
  31. gDone = 0;
  32. gResultat = undefined;
  33. i = 0;
  34. while(i < gListeReponse.length)
  35. {
  36.    gereTextes.afficheLM({mc:_root.LM,codeLM:"LM_R" + gAnimNum + gListeReponse[i],numR:gimme2digits(i + 1)});
  37.    var pClip = this["LM_R" + gAnimNum + gListeReponse[i]];
  38.    var myClip = this["R" + gimme2digits(i + 1)];
  39.    myClip.gotoAndPlay("E1");
  40.    myClip.pCode = gListeReponse[i];
  41.    myClip.onRollOver = function()
  42.    {
  43.       if(gDone == 0)
  44.       {
  45.          gereCursor(2);
  46.          this.gotoAndPlay("E2");
  47.          joueBruitage({nomSon:"B_REP"});
  48.          trace(this.pCode);
  49.       }
  50.    };
  51.    myClip.onRollOut = function()
  52.    {
  53.       if(gDone == 0)
  54.       {
  55.          gereCursor(1);
  56.          this.gotoAndPlay("E1");
  57.          stopBruitage({nomSon:"B_REP"});
  58.       }
  59.    };
  60.    myClip.onPress = function()
  61.    {
  62.       if(gDone == 0)
  63.       {
  64.          gereCursor(1);
  65.          stopBruitage({nomSon:"B_REP"});
  66.          this.useHandCursor = false;
  67.          gDone = 1;
  68.          if(this.pCode == "A")
  69.          {
  70.             this.gotoAndPlay("E4");
  71.             PERSO_QUIZ.gotoAndPlay("S");
  72.             gResultat = "S";
  73.             lanceExp();
  74.          }
  75.          else
  76.          {
  77.             this.gotoAndPlay("E3");
  78.             gResultat = "E";
  79.             PERSO_QUIZ.gotoAndPlay("E");
  80.             lanceExp();
  81.          }
  82.       }
  83.    };
  84.    i++;
  85. }
  86. stop();
  87.