发信人: aeoluszan(呢隻貓仔)
整理人: lyongmei1977(2002-06-29 23:09:44), 站内信件
|
可以根据坐标画图和填充:
比如画三角形:
_root.createEmptyMovieClip ("triangle", 1);
with (_root.triangle){
beginFill (0x0000FF, 50);
lineStyle (5, 0xFF00FF, 100);
moveTo (200, 200);
lineTo (300, 300);
lineTo (100, 300);
lineTo (200, 200);
endFill();
}
矩形加渐变色填充:
_root.createEmptyMovieClip("grad", 1);
with (_root.grad) {
colors = [0xFF0000, 0x0000FF];
alphas = [100, 100];
ratios = [0, 0xFF];
matrix = {a:200, b:0, c:0, d:0, e:200, f:0, g:200, h:200, i:1};
beginGradientFill("linear", colors, alphas, ratios, matrix);
moveto(100, 100);
lineto(100, 300);
lineto(300, 300);
lineto(300, 100);
lineto(100, 100);
endFill();
}
矩形加渐变色填充, 渐变色可以控制方向:
_root.createEmptyMovieClip("grad", 1);
with (_root.grad) {
colors = [0xFF0000, 0x0000FF];
alphas = [100, 100];
ratios = [0, 0xFF];
matrix = {matrixType:"box", x:100, y:100, w:200, h:200, r:(45/180)*Math.PI};
beginGradientFill("linear", colors, alphas, ratios, matrix);
moveto(100, 100);
lineto(100, 300);
lineto(300, 300);
lineto(300, 100);
lineto(100, 100);
endFill();
}
已经可以画弧线了,不过我怎么画不出一个圆?
_root.createEmptyMovieClip("triangle", 1);
with (_root.triangle) {
beginFill(0x0000FF, 50);
lineStyle(5, 0xFF00FF, 100);
moveTo(200, 100);
curveTo(300, 200, 200, 300);
curveTo(100, 200, 200, 100);
endFill();
}
----
|
|