5D艺术网首页
商城
|
资讯
|
作品
|
博客
|
教程
|
论坛
登录
注册
加为好友
发短消息
来自:
性别:秘密
最后登录:2010-03-02
http://wyongedu.5d.cn/
Love is like a butterfly. It goes where it pleases and it pleases where it goes
首页
|
新闻
|
话题
|
博客
|
相册
|
艺术作品
|
社交关系
|
留言板
|
社交圈
2005/10/28 | Actionscript 3 - First Steps IV
类别(失落的感情)
|
评论
(1)
|
阅读(47)
|
发表于 10:48
If you have seen our first examples, you may have wondered, if we can do more with a MovieClip than just trace. And yes indeed, the good old drawing api is still intact. It was just pushed down to the member MovieClip.graphics.
package {
import flash.display.MovieClip;
public class Test extends MovieClip {
public function Test() {
var bgColor:int = 0xff0000;
var size:int = 400;
var count:int = 300;
graphics.beginFill(bgColor);
for( var i:int=0; i<count; i++){
graphics.lineTo(
Math.floor(size*Math.random()),
Math.floor(size*Math.random()));
}
graphics.endFill();
}
}
}
Additionally there are new methods like drawRect and drawCircle, which make drawing a lot more convenient these days.
0
评论
Comments
日志分类
首页
[192]
失落的感情
[27]
失落的学习
[30]
失落的时间
[5]
失落的网络
[85]
失落的自己
[42]
失落的朋友
[3]