//插入测试笔刷GPen
import gx.GPen;
var mypen:GPen = new GPen(3, "0x0000ff", 70);
//mypen.width = 10;
//画矩形drawRect
function GDrawRect(pen:GPen, x:Number, y:Number, h:Number, w:Number) {
_root.createEmptyMovieClip("gx", 1);
with (_root.gx) {
lineStyle(pen.width, pen.color, pen.alpha);
moveTo(x, y);
lineTo(x+w, y);
lineTo(x+w, y+h);
lineTo(x, y+h);
lineTo(x, y);
}
}
//测试,画出一蓝色小矩形
GDrawRect(mypen, 100, 100, 30, 50);
|