draw line in actionscript 3 without using the draw API?

Go To StackoverFlow.com

0

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

2012-04-05 21:22
by Phil


3

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.

2012-04-05 21:47
by grapefrukt
thanks, I got that working, but it gives a mask like effect, which after seeing it, is not what I want, I need it to look like I'm stretching out a line which has a pattern (movieclip) on it, not like I'm just moving a line-mask around over the top of a pattern, which is what lineBitmapStyle gives you - Phil 2012-04-06 13:16
If you expand your original question to cover how you want it to look it will be a lot easier to give pointers - grapefrukt 2012-04-06 13:18
Ads