ActionScript 3 Tips and Tricks (3)

 
[1b]Graphics Object and the Drawing API[/1b]
[1b]图形对象和绘图[/1b][1b]API [/1b]
Like ActionScript 1 and 2, ActionScript 3 also has a drawing API that allows you to draw vector lines and shapes dynamically in movie clips and sprites.
 
和ActionScript 1、2一样,ActionScript 3同样拥有一个绘图的API。这个API同样可以让你的movie clips 和 sprites中动态地生成出矢量的线和形状。
 
With ActionScript 3, however, the drawing API is now used off of an object within display objects (movie clips, sprites, etc.) defined as graphics (
[url=http://livedocs.macromedia.com/flex/2/langref/flash/display/Graphics.html]flash.display.Graphics[/url]
).
 
然而在ActionScript 3中,绘图API,被单独定义成graphics (
[url=http://livedocs.macromedia.com/flex/2/langref/flash/display/Graphics.html]flash.display.Graphics[/url]
),不再和显示对象(movie clips, sprites, 等等)有什么联系。
 
This graphics property represents the dynamic drawing layer where drawing API drawings exist.
 
图形对象拥有各种绘图方法用来在内部绘制图形。 //FlashseerBBS
 
Like before, it is placed below all children of the target object.
 
和以前一样,新添加的绘图对象位于所有显示的对象之下
 
Also, in ActionScript 3, you have new methods that help you more easily create rectangles, circles, and even rounded rectangles.
本文转自:http://www.5uflash.com/flashjiaocheng/Flash-as3-jiaocheng/1809.html
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值