Ozzy
Ozzy

Reputation: 10643

AS3 change lineStyle of existing line

im drawing a line from 0,0 to 100,100

im using this to modify the linestyle:

draw_line.graphics.lineStyle(1, 0xFF0000);

That line is now of 1 thickness.

Is there anyway i can change the thickness of the line to say 10, but without redrawing the line?

Upvotes: 3

Views: 3738

Answers (2)

Colin Brogan
Colin Brogan

Reputation: 748

try this:

draw_line.scaleX = 10;

Not exactly the same, but could possibly work under certain circumstances.

Upvotes: 0

davr
davr

Reputation: 19147

No, it is not possible with the way the flash player works, you must redraw the line. Or use some kind of library that automatically redraws it for you (for example a Line object in the Flex 4 Framework)

Upvotes: 4

Related Questions