I'd like to have an overlay that draws lines between selected items in different Flex 4 List controls.
The problem is I can't figure out how to access the x, y coordinates of the list's item renderers.
Any help appreciated.
I'd like to have an overlay that draws lines between selected items in different Flex 4 List controls.
The problem is I can't figure out how to access the x, y coordinates of the list's item renderers.
Any help appreciated.
So the line drawing is triggered by clicking the list items, and as such I can access the item renderer coordinates by setting up listeners for mousedown events in the item renderer init function. Doesn't quite answer this question but does solve my issue.
Ok, far better solution:
DisplayObject provides a localToGlobal function, which takes some local coordinate and converts it into a global coordinate.
:)
When the Skin object calls localToGlobal(this.x, this.y) voila! We have our global x,y coordinates. So simple it's embarassing.