How to perform event on flex line objects.so i can able to move or re-size the line using mouse.I am using flexline as shown in below code:-
spark.primitives.Line;
var st:Stroke =new Stroke(0x345654,1,1);
var obj:Line = new Line();
obj.stroke =st;
obj.xFrom =0;
obj.yFrom=0;
obj.xTo = 500;
obj.yTo = 500;
obj.addEventListener =????? //how to resize this line using mouse??
please explain how to addeventlistner on line or give any other idea to achieve this.
It is not possible. Line
is not an InteractiveObject
.
You can add it to a group and then listen to its events,
or draw a line with graphics
on Sprite
and listen to sprite events(this is more lightweight).
Or you may add all graphic primitives like Line
to group and calculate by code which line appeared under group click.