码迷,mamicode.com
首页 > 其他好文 > 详细

scale

时间:2016-06-29 18:46:18      阅读:107      评论:0      收藏:0      [点我收藏+]

标签:

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

 

scale

标签:

原文地址:http://www.cnblogs.com/jiangjieqim/p/5627795.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!