View Full Version : Changing lineStyle
12-01-2006, 06:21 PM
I'm dynamically creating a movie clip and drawing a line. After it's been drawn initially I would like to be able to change it's lineStyle during runtime. If I just call the lineStyle method on that MovieClip it doesn't seem to change the line. Is there a way to force the line to redraw, or do I manually have to clear the MovieClip and then call lineStyle, moveTo, lineTo, etc. and recreate the line?
12-01-2006, 07:23 PM
i think the only way is to clear the movie clip, or remove it altoghether and re-create a new one. i cant seem to get it to work.
12-01-2006, 08:05 PM
any visual change you want to make to something made from the drawing api would have to be cleared and redrawn.
12-01-2006, 08:10 PM
you could probably build a class that does all this for you, and you could just pass it new parameters for the line style.
may be the best idea if your planning on doing this a lot in an app.
12-01-2006, 08:21 PM
Thanks everybody. I guess re-creating the line isn't really that tough I was just hoping there was a simpler way.
12-01-2006, 08:45 PM
its better that way. What if you want two lines with two different linestyles?
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.