Phil
Phil

Reputation: 3045

draw line in actionscript 3 without using the draw API?

I need to be able to draw a thick patterend line between 2 points in AS3, I can't use the draw API because it doesn't all me to actually put detail (pattern etc) into the thickness of the line, I thought about perhaps using the line to create a bitmap version and then using that as a mask, but I remember many years ago seeing some examples that use a movieclip as a source for a line, but I can't find examples of that now at all, any ideas?

I've attached an example image of how I want the line to look.enter image description here

Upvotes: 0

Views: 562

Answers (1)

grapefrukt
grapefrukt

Reputation: 27045

I suspect Graphics.lineBitmapStyle() will do the trick. If you want to use a Sprite or MovieClip as the source, you'll have to draw() it to a BitmapData first. The example code on that later link should get you up and running with that.

Upvotes: 3

Related Questions