[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