home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Esportes / CrossingCup.swf / scripts / __Packages / CCornerKicker.as < prev    next >
Text File  |  2007-12-11  |  2KB  |  61 lines

  1. class CCornerKicker
  2. {
  3.    var def_bx = 54.5;
  4.    var def_by = 0;
  5.    var def_bz = -37.5;
  6.    function CCornerKicker(bg, _mcParent)
  7.    {
  8.       this.mybg = bg;
  9.       this.mcParent = _mcParent;
  10.       this.createAnim();
  11.    }
  12.    function createAnim()
  13.    {
  14.       this.bx = this.def_bx;
  15.       this.by = this.def_by;
  16.       this.bz = this.def_bz;
  17.       var _loc3_ = new sandy.core.Sprite2D(0.1);
  18.       this.mcKicker = this.mcParent.attachMovie("cornerkicker","cornerkicker",this.mcParent.getNextHighestDepth());
  19.       this.mcKicker._visible = false;
  20.       var _loc4_ = new sandy.skin.MovieSkin(this.mcKicker);
  21.       _loc3_.setSkin(_loc4_);
  22.       this.mcKicker.gotoAndStop(1);
  23.       var _loc6_ = new sandy.core.group.TransformGroup();
  24.       var _loc5_ = new sandy.core.group.TransformGroup();
  25.       var _loc2_ = new sandy.core.group.TransformGroup();
  26.       _loc2_ = new sandy.core.group.TransformGroup();
  27.       this.bTrans = new sandy.core.transform.Transform3D();
  28.       this.bTrans.translate(this.bx,this.by,this.bz);
  29.       _loc2_.setTransform(this.bTrans);
  30.       _loc2_.addChild(_loc3_);
  31.       this.mybg.addChild(_loc2_);
  32.    }
  33.    function hide()
  34.    {
  35.       this.mcKicker.gotoAndStop(1);
  36.    }
  37.    function show()
  38.    {
  39.       this.mcKicker.gotoAndStop(2);
  40.    }
  41.    function restart()
  42.    {
  43.       this.mcKicker.gotoAndStop(1);
  44.    }
  45.    function kick()
  46.    {
  47.       this.mcKicker.gotoAndPlay(2);
  48.    }
  49.    function setHuman(human)
  50.    {
  51.       if(human == true)
  52.       {
  53.          this.mcKicker.indicator._visible = true;
  54.       }
  55.       else
  56.       {
  57.          this.mcKicker.indicator._visible = false;
  58.       }
  59.    }
  60. }
  61.