1 package mgzj.impls.common.view.component 2 { 3 import com.greensock.easing.Back; 4 5 import flash.display.Bitmap; 6 import flash.display.BitmapData; 7 import flash.display.Loader; 8 import flash.display.Sprite; 9 import flash.events.Event; 10 import flash.events.IOErrorEvent; 11 import flash.events.TimerEvent; 12 import flash.geom.Rectangle; 13 import flash.net.URLLoader; 14 import flash.utils.ByteArray; 15 import flash.utils.Timer; 16 17 import ma.resource.ResManager; 18 import ma.resource.data.ResInfo; 19 20 public class Effect_Players extends Sprite 21 { 22 private var frameNum:int=-1; 23 private var currentframeNum:int=0; 24 25 private var bdList:Array=[]; 26 27 private var _byteData:ByteArray; 28 29 private var _bd:Bitmap; 30 31 private var old_pos:int=0; 32 33 public function Effect_Players() 34 { 35 _bd=new Bitmap; 36 this.addChild(_bd); 37 } 38 39 /** 40 * 41 * @param _name 42 * 43 */ 44 public function startEffect(_name:String):void 45 { 46 47 ResManager.instance.loadDynaResource("godbless", _name, callBack); 48 } 49 50 private function callBack(e:Event, resinfo:ResInfo, data:*):void 51 { 52 if (e.type != Event.COMPLETE || data == null) 53 { 54 return; 55 } 56 57 _byteData=data as ByteArray; 58 _byteData.position=0; 59 60 frameNum=_byteData.readInt(); 61 62 for(var i:int=0;i