home *** CD-ROM | disk | FTP | other *** search
- package Gamefile
- {
- import fl.transitions.easing.*;
- import flash.display.MovieClip;
- import flash.geom.ColorTransform;
-
- public class Sole
- {
-
-
- private var colorTransform:ColorTransform;
-
- public var soleMC:MovieClip;
-
- public var soleArr:Array;
-
- private var sole:MovieClip;
-
- private var soundName:String;
-
- public const operateType:int = 1;
-
- public function Sole()
- {
- super();
- initProperty();
- }
-
- public function hideSoleArr() : *
- {
- var _loc1_:int = 0;
- if(soleArr.length >= 1)
- {
- _loc1_ = 0;
- while(_loc1_ < soleArr.length)
- {
- if(soleArr[_loc1_] != null)
- {
- if(soleArr[_loc1_] != "end")
- {
- soleArr[_loc1_].visible = false;
- }
- }
- _loc1_++;
- }
- }
- }
-
- private function initProperty() : *
- {
- colorTransform = new ColorTransform();
- soleArr = new Array();
- }
-
- public function pushEndFlag(param1:Boolean) : *
- {
- if(param1 == false)
- {
- if(soleMC != null)
- {
- soleArr.push(soleMC);
- soleArr.push("end");
- }
- trace(soleArr);
- }
- soleMC = null;
- }
-
- public function showSoleArr() : *
- {
- var _loc1_:int = 0;
- if(soleArr.length >= 1)
- {
- _loc1_ = 0;
- while(_loc1_ < soleArr.length)
- {
- if(soleArr[_loc1_] != null)
- {
- if(soleArr[_loc1_] != "end")
- {
- soleArr[_loc1_].visible = true;
- }
- }
- _loc1_++;
- }
- }
- }
-
- public function showSole(param1:MovieClip, param2:String, param3:int, param4:int, param5:Number, param6:uint, param7:Boolean) : *
- {
- if(soundName != null)
- {
- SoundsManager.StopSound(soundName);
- soundName = null;
- }
- switch(param2)
- {
- case "FlamingoBtn":
- SoundsManager.playSound("_ModerateAnimal_");
- soundName = "_ModerateAnimal_";
- sole = new _Flamingo_();
- break;
- case "PandaBtn":
- SoundsManager.playSound("_PonderosityAnimal_");
- soundName = "_PonderosityAnimal_";
- sole = new _Panda_();
- break;
- case "ChickBtn":
- SoundsManager.playSound("_SmallAnimal_");
- soundName = "_SmallAnimal_";
- sole = new _Chick_();
- break;
- case "CatBtn":
- SoundsManager.playSound("_SmallAnimal_");
- soundName = "_SmallAnimal_";
- sole = new _Cat_();
- break;
- case "HippoBtn":
- SoundsManager.playSound("_PonderosityAnimal_");
- soundName = "_PonderosityAnimal_";
- sole = new _Hippo_();
- }
- if(soleMC == null)
- {
- trace("creat MC");
- soleMC = new MovieClip();
- param1.addChild(soleMC);
- }
- soleMC.addChild(sole);
- sole.x = param3;
- sole.y = param4;
- sole.rotation = param5;
- if(param6 > 0)
- {
- colorTransform.color = param6;
- sole.transform.colorTransform = colorTransform;
- }
- }
- }
- }
-