home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Diversos / animal_artist.swf / scripts / Gamefile / Sole.as < prev    next >
Encoding:
Text File  |  2008-09-05  |  3.7 KB  |  141 lines

  1. package Gamefile
  2. {
  3.    import fl.transitions.easing.*;
  4.    import flash.display.MovieClip;
  5.    import flash.geom.ColorTransform;
  6.    
  7.    public class Sole
  8.    {
  9.        
  10.       
  11.       private var colorTransform:ColorTransform;
  12.       
  13.       public var soleMC:MovieClip;
  14.       
  15.       public var soleArr:Array;
  16.       
  17.       private var sole:MovieClip;
  18.       
  19.       private var soundName:String;
  20.       
  21.       public const operateType:int = 1;
  22.       
  23.       public function Sole()
  24.       {
  25.          super();
  26.          initProperty();
  27.       }
  28.       
  29.       public function hideSoleArr() : *
  30.       {
  31.          var _loc1_:int = 0;
  32.          if(soleArr.length >= 1)
  33.          {
  34.             _loc1_ = 0;
  35.             while(_loc1_ < soleArr.length)
  36.             {
  37.                if(soleArr[_loc1_] != null)
  38.                {
  39.                   if(soleArr[_loc1_] != "end")
  40.                   {
  41.                      soleArr[_loc1_].visible = false;
  42.                   }
  43.                }
  44.                _loc1_++;
  45.             }
  46.          }
  47.       }
  48.       
  49.       private function initProperty() : *
  50.       {
  51.          colorTransform = new ColorTransform();
  52.          soleArr = new Array();
  53.       }
  54.       
  55.       public function pushEndFlag(param1:Boolean) : *
  56.       {
  57.          if(param1 == false)
  58.          {
  59.             if(soleMC != null)
  60.             {
  61.                soleArr.push(soleMC);
  62.                soleArr.push("end");
  63.             }
  64.             trace(soleArr);
  65.          }
  66.          soleMC = null;
  67.       }
  68.       
  69.       public function showSoleArr() : *
  70.       {
  71.          var _loc1_:int = 0;
  72.          if(soleArr.length >= 1)
  73.          {
  74.             _loc1_ = 0;
  75.             while(_loc1_ < soleArr.length)
  76.             {
  77.                if(soleArr[_loc1_] != null)
  78.                {
  79.                   if(soleArr[_loc1_] != "end")
  80.                   {
  81.                      soleArr[_loc1_].visible = true;
  82.                   }
  83.                }
  84.                _loc1_++;
  85.             }
  86.          }
  87.       }
  88.       
  89.       public function showSole(param1:MovieClip, param2:String, param3:int, param4:int, param5:Number, param6:uint, param7:Boolean) : *
  90.       {
  91.          if(soundName != null)
  92.          {
  93.             SoundsManager.StopSound(soundName);
  94.             soundName = null;
  95.          }
  96.          switch(param2)
  97.          {
  98.             case "FlamingoBtn":
  99.                SoundsManager.playSound("_ModerateAnimal_");
  100.                soundName = "_ModerateAnimal_";
  101.                sole = new _Flamingo_();
  102.                break;
  103.             case "PandaBtn":
  104.                SoundsManager.playSound("_PonderosityAnimal_");
  105.                soundName = "_PonderosityAnimal_";
  106.                sole = new _Panda_();
  107.                break;
  108.             case "ChickBtn":
  109.                SoundsManager.playSound("_SmallAnimal_");
  110.                soundName = "_SmallAnimal_";
  111.                sole = new _Chick_();
  112.                break;
  113.             case "CatBtn":
  114.                SoundsManager.playSound("_SmallAnimal_");
  115.                soundName = "_SmallAnimal_";
  116.                sole = new _Cat_();
  117.                break;
  118.             case "HippoBtn":
  119.                SoundsManager.playSound("_PonderosityAnimal_");
  120.                soundName = "_PonderosityAnimal_";
  121.                sole = new _Hippo_();
  122.          }
  123.          if(soleMC == null)
  124.          {
  125.             trace("creat MC");
  126.             soleMC = new MovieClip();
  127.             param1.addChild(soleMC);
  128.          }
  129.          soleMC.addChild(sole);
  130.          sole.x = param3;
  131.          sole.y = param4;
  132.          sole.rotation = param5;
  133.          if(param6 > 0)
  134.          {
  135.             colorTransform.color = param6;
  136.             sole.transform.colorTransform = colorTransform;
  137.          }
  138.       }
  139.    }
  140. }
  141.