开发者

Direct access to Sprite's graphics

I"m new to AS3 and I would like to know how can I get to graphics of a Sprite so开发者_运维知识库 I could draw it directly from it. I mean I don"t want to use Sprite class as my concrete objects I just want Sprite to hold graphics so if my own object needs to be drawn it asks for graphics to SpriteManager which returns Sprite with required graphics and draws it exactly where I want to not where Sprite's coordinates points to.

Thank you for answer.


I'm not sure I get what you want to do, but you can use a Shape object and draw on it like this

var s:Shape = new Shape();
s.graphics.beginFill( 0 );
s.graphics.drawCircle( 10, 10, 10 );
s.graphics.endFill();

It's just a basic object that acts as a drawing layer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜