home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 144 / MOBICLIC144.ISO / mac / DATA / TST144 / TST144_00 / TST144_00.swf / scripts / frame_41 / DoAction.as
Text File  |  2012-04-23  |  3KB  |  120 lines

  1. if(gPCent == undefined)
  2. {
  3.    gBlockST = 1;
  4.    joueSon({nomSon:"C00",actionFin:"RIEN"});
  5. }
  6. lList = ["A","B","C","D","E"];
  7. gListe_W_H = [[151,281],[120,226],[90,168],[42,82]];
  8. var myMax = 0;
  9. var i = 0;
  10. while(i < gListPCent.length)
  11. {
  12.    if(gListPCent[i] > myMax)
  13.    {
  14.       myMax = gListPCent[i];
  15.    }
  16.    i++;
  17. }
  18. gListeCadre = [];
  19. var i = 0;
  20. while(i < gListPCent.length)
  21. {
  22.    gListeCadre[i] = 0;
  23.    this["CONCLU_" + lList[i]]._alpha = 0;
  24.    var myClip = this["CONCLU_" + lList[i]].CONCLU.CONCLU.ACCUEIL;
  25.    if(gSexe == "G")
  26.    {
  27.       myClip.id = "A_" + gModuleName + "_CONCLU_" + lList[i];
  28.    }
  29.    else
  30.    {
  31.       myClip.id = "A_" + gModuleName + "_CONCLU_" + lList[i] + "Z";
  32.    }
  33.    var swfHolderNom = myClip.createEmptyMovieClip("swfHolder_" + (i + 1),chercheDepthPlus(myClip,0));
  34.    myClip["swfHolder_" + (i + 1)].pNum = i;
  35.    this["mclR_C_" + i] = new MovieClipLoader();
  36.    this["mclR_C_" + i].loadClip(_global.gModulePath + moduleInfo.getResourceById(myClip.id).firstChild.attributes.src,swfHolderNom);
  37.    this["mclR_C_" + i].onLoadInit = function(lClip)
  38.    {
  39.       var _loc2_ = lClip._parent._parent._parent._parent;
  40.       var _loc1_ = gListPCent[Number(lClip._name.split("_")[1]) - 1] * 100 / myMax;
  41.       if(_loc1_ == 0)
  42.       {
  43.          _loc1_ = 10;
  44.       }
  45.       var _loc5_ = Number(lClip._name.split("_")[1]) - 1;
  46.       var _loc4_ = gListeCadre[_loc5_];
  47.       cadreWidth = gListe_W_H[_loc4_][0];
  48.       cadreHeight = gListe_W_H[_loc4_][1];
  49.       adapteImage(lClip,1);
  50.       _loc2_._xscale = _loc1_;
  51.       _loc2_._yscale = _loc1_;
  52.       _loc2_._y -= 59 * (100 - _loc1_) / 100;
  53.       _loc2_._alpha = 100;
  54.    };
  55.    myClip._parent._parent.pCent.text = String(gListPCent[i]) + "%";
  56.    var lIB = "";
  57.    var _loc0_ = null;
  58.    if((_loc0_ = gSexe) !== "F")
  59.    {
  60.       lIB = "IB" + lList[i];
  61.    }
  62.    else if(gereTextes.getTextById(XmlIB,"IB" + lList[i] + "Z") !== undefined)
  63.    {
  64.       lIB = "IB" + lList[i] + "Z";
  65.    }
  66.    else
  67.    {
  68.       lIB = "IB" + lList[i];
  69.    }
  70.    this["CONCLU_" + lList[i]].pIB = lIB;
  71.    this["CONCLU_" + lList[i]].pLettre = lList[i];
  72.    this["CONCLU_" + lList[i]].onRollOver = function()
  73.    {
  74.       gereCursor(2);
  75.       this.CONCLU.CONCLU.gotoAndStop("E2");
  76.       gereTextes.afficheIB({X:this._x,Y:this._y - this._yscale / 2,codeIB:this.pIB});
  77.       var _loc3_ = _root.IB;
  78.       var _loc4_ = _loc3_.IB.fond._width;
  79.       _loc3_._x -= _loc4_ / 2;
  80.       joueBruitage({nomSon:"B_" + this.pLettre});
  81.    };
  82.    this["CONCLU_" + lList[i]].onDragOut = _loc0_ = function()
  83.    {
  84.       gereCursor(1);
  85.       this.CONCLU.CONCLU.gotoAndStop("E1");
  86.       gereTextes.masqueIB();
  87.       stopBruitage({nomSon:"B_" + this.pLettre});
  88.    };
  89.    this["CONCLU_" + lList[i]].onRollOut = _loc0_;
  90.    this["CONCLU_" + lList[i]].onPress = function()
  91.    {
  92.       gereCursor(1);
  93.       gereTextes.masqueIB();
  94.       this.CONCLU.CONCLU.gotoAndStop("E1");
  95.       stopBruitage({nomSon:"B_" + this.pLettre});
  96.       if(gSexe == "G")
  97.       {
  98.          gConclu = this.pLettre;
  99.       }
  100.       else
  101.       {
  102.          gConclu = this.pLettre + "Z";
  103.       }
  104.       gPCent = this.CONCLU.pCent.text.split("%")[0];
  105.       gotoAndStop("PROFIL");
  106.    };
  107.    i++;
  108. }
  109. onMcOver({mc:BT_PRINT,codeIB:"IB94"});
  110. BT_PRINT.onPress = function()
  111. {
  112.    onMcOut(this);
  113.    BT_REFAIRE._visible = false;
  114.    this._visible = false;
  115.    _global.ImprimerEcran();
  116.    BT_REFAIRE._visible = true;
  117.    this._visible = true;
  118. };
  119. stop();
  120.