scale

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);

 

转载于:https://www.cnblogs.com/jiangjieqim/p/5627795.html

你可能感兴趣的:(scale)