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

  1. function initDialog()
  2. {
  3.    etatPlay = 1;
  4.    DIALOG.BT_PLAY_PAUSE.gotoAndStop("E2");
  5.    DIALOG.BT_FERMER.onRollOver = function()
  6.    {
  7.       gereCursor(2);
  8.       this.gotoAndStop("E2");
  9.       joueBruitage({nomSon:"B_FERMER"});
  10.       gereTextes.afficheIB({codeIB:"IB_CLOSE",mc:this});
  11.    };
  12.    DIALOG.BT_FERMER.onRollOut = function()
  13.    {
  14.       gereCursor(1);
  15.       this.gotoAndStop("E1");
  16.       stopBruitage({nomSon:"B_FERMER"});
  17.       gereTextes.masqueIB();
  18.    };
  19.    DIALOG.BT_FERMER.onPress = function()
  20.    {
  21.       gereCursor(1);
  22.       stopBruitage({nomSon:"B_FERMER"});
  23.       if(gCommentOn !== undefined)
  24.       {
  25.          stopSon();
  26.       }
  27.       gereTextes.masqueIB();
  28.       joueBruitage({nomSon:"B_DIA_INTRO"});
  29.       _root.DIALOG.gotoAndPlay("FIN_FADE");
  30.    };
  31.    DIALOG.BT_BEGIN.onRollOver = function()
  32.    {
  33.       gereCursor(2);
  34.       this.gotoAndStop("E2");
  35.       joueBruitage({nomSon:"B_BEGIN"});
  36.       gereTextes.afficheIB({codeIB:"IB_BEGIN",mc:this});
  37.    };
  38.    DIALOG.BT_BEGIN.onRollOut = function()
  39.    {
  40.       gereCursor(1);
  41.       this.gotoAndStop("E1");
  42.       stopBruitage({nomSon:"B_BEGIN"});
  43.       gereTextes.masqueIB();
  44.    };
  45.    DIALOG.BT_BEGIN.onPress = function()
  46.    {
  47.       _root.gNextLabel = undefined;
  48.       gereCursor(1);
  49.       stopBruitage({nomSon:"B_BEGIN"});
  50.       if(gCommentOn !== undefined)
  51.       {
  52.          stopSon();
  53.       }
  54.       gereTextes.masqueIB();
  55.       this._parent.BT_PLAY_PAUSE.gotoAndStop("E2");
  56.       _root.etatPlay = 1;
  57.       this._parent.gotoAndPlay("ANIM_02");
  58.    };
  59.    DIALOG.BT_PLAY_PAUSE.onRollOver = function()
  60.    {
  61.       gereCursor(2);
  62.       this.BT.gotoAndStop("E2");
  63.       switch(_root.etatPlay)
  64.       {
  65.          case 0:
  66.             joueBruitage({nomSon:"B_PLAY"});
  67.             gereTextes.afficheIB({codeIB:"IB_PLAY",mc:this});
  68.             break;
  69.          case 1:
  70.             joueBruitage({nomSon:"B_PAUSE"});
  71.             gereTextes.afficheIB({codeIB:"IB_PAUSE",mc:this});
  72.       }
  73.    };
  74.    DIALOG.BT_PLAY_PAUSE.onRollOut = function()
  75.    {
  76.       gereCursor(1);
  77.       this.BT.gotoAndStop("E1");
  78.       stopBruitage({nomSon:"B_PLAY"});
  79.       stopBruitage({nomSon:"B_PAUSE"});
  80.       gereTextes.masqueIB();
  81.    };
  82.    DIALOG.BT_PLAY_PAUSE.onPress = function()
  83.    {
  84.       _root.gNextLabel = undefined;
  85.       gereCursor(1);
  86.       stopBruitage({nomSon:"B_PLAY"});
  87.       stopBruitage({nomSon:"B_PAUSE"});
  88.       if(gCommentOn !== undefined)
  89.       {
  90.          stopSon();
  91.       }
  92.       gereTextes.masqueIB();
  93.       switch(_root.etatPlay)
  94.       {
  95.          case 1:
  96.             trace("_root.dialogEcran " + _root.dialogEcran);
  97.             this.gotoAndStop("E1");
  98.             etatPlay = 0;
  99.             this._parent.gotoAndStop(_root.dialogEcran);
  100.             break;
  101.          case 0:
  102.             this.gotoAndStop("E2");
  103.             etatPlay = 1;
  104.             this._parent.play();
  105.       }
  106.    };
  107.    DIALOG.BT_RWD.onRollOver = function()
  108.    {
  109.       gereCursor(2);
  110.       this.gotoAndStop("E2");
  111.       joueBruitage({nomSon:"B_RWD"});
  112.       gereTextes.afficheIB({codeIB:"IB_PREV",mc:this});
  113.    };
  114.    DIALOG.BT_RWD.onRollOut = function()
  115.    {
  116.       gereCursor(1);
  117.       this.gotoAndStop("E1");
  118.       stopBruitage({nomSon:"B_RWD"});
  119.       gereTextes.masqueIB();
  120.    };
  121.    DIALOG.BT_RWD.onPress = function()
  122.    {
  123.       gereCursor(1);
  124.       stopBruitage({nomSon:"B_RWD"});
  125.       if(gCommentOn !== undefined)
  126.       {
  127.          stopSon();
  128.       }
  129.       gereTextes.masqueIB();
  130.       _root.DIALOG.LM_LMT.texte.text = "";
  131.       var _loc2_ = Number(_root.dialogEcran.split("_")[1]);
  132.       if(_loc2_ > 2)
  133.       {
  134.          if(etatPlay == 1)
  135.          {
  136.             _root.DIALOG.gotoAndPlay("ANIM_" + gimme2digits(_loc2_ - 1));
  137.          }
  138.          else
  139.          {
  140.             _root.DIALOG.gotoAndStop("ANIM_" + gimme2digits(_loc2_ - 1));
  141.          }
  142.       }
  143.    };
  144.    DIALOG.BT_FWD.onRollOver = function()
  145.    {
  146.       gereCursor(2);
  147.       this.gotoAndStop("E2");
  148.       joueBruitage({nomSon:"B_FWD"});
  149.       gereTextes.afficheIB({codeIB:"IB_NEXT",mc:this});
  150.    };
  151.    DIALOG.BT_FWD.onRollOut = function()
  152.    {
  153.       gereCursor(1);
  154.       this.gotoAndStop("E1");
  155.       stopBruitage({nomSon:"B_FWD"});
  156.       gereTextes.masqueIB();
  157.    };
  158.    DIALOG.BT_FWD.onPress = function()
  159.    {
  160.       gereCursor(1);
  161.       stopBruitage({nomSon:"B_FWD"});
  162.       if(gCommentOn !== undefined)
  163.       {
  164.          stopSon();
  165.       }
  166.       gereTextes.masqueIB();
  167.       _root.DIALOG.LM_LMT.texte.text = "";
  168.       var _loc2_ = Number(_root.dialogEcran.split("_")[1]);
  169.       if(_loc2_ < _root.totalDialogue)
  170.       {
  171.          if(etatPlay == 1)
  172.          {
  173.             _root.DIALOG.gotoAndPlay("ANIM_" + gimme2digits(_loc2_ + 1));
  174.          }
  175.          else
  176.          {
  177.             _root.DIALOG.gotoAndStop("ANIM_" + gimme2digits(_loc2_ + 1));
  178.          }
  179.       }
  180.    };
  181.    DIALOG.BT_LM.onRollOver = function()
  182.    {
  183.       this.useHandCursor = 0;
  184.       if(_root.DIALOG.LM_LMT._visible == 0)
  185.       {
  186.          joueBruitage({nomSon:"B_AFFLM"});
  187.          gereTextes.afficheIB({codeIB:"IB_AFFLM",mc:this});
  188.          this.useHandCursor = 1;
  189.          gereCursor(2);
  190.          this.gotoAndStop("E2");
  191.       }
  192.    };
  193.    DIALOG.BT_LM.onRollOut = function()
  194.    {
  195.       if(_root.DIALOG.LM_LMT._visible == 0)
  196.       {
  197.          stopBruitage({nomSon:"B_AFFLM"});
  198.          gereCursor(1);
  199.          this.gotoAndStop("E1");
  200.          gereTextes.masqueIB();
  201.       }
  202.    };
  203.    DIALOG.BT_LM.onPress = function()
  204.    {
  205.       if(_root.DIALOG.LM_LMT._visible == 0)
  206.       {
  207.          stopBruitage({nomSon:"B_AFFLM"});
  208.          gereCursor(1);
  209.          this.gotoAndStop("E1");
  210.          _root.DIALOG.LM_LMT._visible = 1;
  211.          gereTextes.masqueIB();
  212.       }
  213.    };
  214. }
  215. totalDialogue = 22;
  216. stop();
  217.