terencechow Posted July 13, 2015 Share Posted July 13, 2015 I've created a graphic with `graphic.lineStyle(2, 0x0000FF, 1);` I see the linestyle at the size and color I want. However a little after I'd like to "remove" the lineStyle by setting the lineAlpha to 0. However I don't see any effect. Is there a reason for this? Note that I do see the graphic disappear when I set alpha to 0 so I know I am referencing the correct object. Quote Link to comment Share on other sites More sharing options...
xerver Posted July 13, 2015 Share Posted July 13, 2015 Did you redraw the link after changing the alpha? Quote Link to comment Share on other sites More sharing options...
terencechow Posted July 14, 2015 Author Share Posted July 14, 2015 What do you mean by redraw the line? The circle is already drawn...I thought `renderer.render(stage)` would rerender the entire stage, with the lineAlpha changed. Are you saying I need to `beginFill`, `drawCircle` and `endFill` again? Quote Link to comment Share on other sites More sharing options...
xerver Posted July 14, 2015 Share Posted July 14, 2015 You drew the line with a certain style, changing properties of the graphics object doesn't change how the line was previously drawn. Think about canvas 2d api, if you draw a line then change the line style that doesn't change how a line was previously drawn it just changes the style for future drawings. Graphics work the same way. If you change the style that is only setting it up for future drawings. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.