Removing a line created with the lineto CreateJS Api code snippet
Hi all:)
I'm currently working on a project, and based on user input some lines between 2 objects is being drawn. Problem is, as soon as the user changes the input, the line should change. Now I succeeded in making the line change, but the old line is not being removed.
var stroke_color = "#0090e3";
var shape1 = new createjs.Shape(new createjs.Graphics().beginStroke(stroke_color).moveTo(this.objectX.x, this.objectX.y).lineTo(this.abc.x, this.abc.y).endStroke());
this.addChild(shape1);
Simply using _this.shape1.visible = false doesn't seem to work, probably because the var name is not the same as the instance name. Any ideas? Maybe there is some command to create a new symbol and add an instance name to it, and then put this code inside of it?
Thanks very much!
