标签:
import flash.utils.getDefinitionByName; import flash.display.BitmapData; import flash.sampler.Sample; import flash.display.Shape; import flash.geom.Matrix; var s:Class = getDefinitionByName("ui.blood") as Class; var bmd:BitmapData = new s(); var _shape:Shape = new Shape(); var _s:Number = 0.8; var _graphics:Graphics = _shape.graphics; var matrix:Matrix = new Matrix(); matrix.d=matrix.a=_s; _graphics.beginBitmapFill(bmd,matrix,false,true); _graphics.drawRect(0,0,bmd.width*_s,bmd.height*_s); _graphics.endFill(); addChild(_shape);
标签:
原文地址:http://www.cnblogs.com/jiangjieqim/p/5627795.html