home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 130 / MOBICLIC130.ISO / pc / DATA / BLA130 / BLA130_01 / BLA130_01.swf / scripts / __Packages / prod / libs / xlib1 / Compteur.as
Text File  |  2010-12-13  |  1KB  |  51 lines

  1. class prod.libs.xlib1.Compteur extends MovieClip
  2. {
  3.    var Valeur = 0;
  4.    function Compteur(p)
  5.    {
  6.       super();
  7.       trace(this);
  8.       this.Init();
  9.    }
  10.    static function main(p)
  11.    {
  12.       p.cible.__proto__ = prod.libs.xlib1.Compteur.prototype;
  13.       prod.libs.xlib1.Compteur.apply(p.cible,p);
  14.    }
  15.    function Init()
  16.    {
  17.       this.Raz();
  18.    }
  19.    function Raz()
  20.    {
  21.       this.ChangerValeur(0);
  22.    }
  23.    function ChangerTemps(temps)
  24.    {
  25.       var _loc3_ = temps / 1000;
  26.       var _loc4_ = Math.floor(_loc3_ / 60);
  27.       _loc3_ = Math.floor(_loc3_ % 60);
  28.       this.Texte.text = _root.gimme2digits(_loc4_) + "." + _root.gimme2digits(_loc3_);
  29.       updateAfterEvent();
  30.    }
  31.    function ChangerValeur(valeur)
  32.    {
  33.       if(valeur == "+")
  34.       {
  35.          this.Valeur = this.Valeur + 1;
  36.       }
  37.       else if(valeur == "-")
  38.       {
  39.          this.Valeur = this.Valeur - 1;
  40.       }
  41.       else
  42.       {
  43.          this.Valeur = valeur;
  44.       }
  45.       trace(" ├¿├¿├¿+*+*+*+* ChangerValeur " + this.Valeur + " " + this.Texte + " " + _root.gimme2digits(this.Valeur));
  46.       this.Texte.text = _root.gimme2digits(this.Valeur);
  47.       trace("texte " + this.Texte.text);
  48.       updateAfterEvent();
  49.    }
  50. }
  51.