After a few hours of noodling, I could use some help wrapping my head around this...
I believe I need to use contentToLocal() but I'm not sure. Blood is now coming out of my ears :-)
I'm essentially trying to draw a line between two display objects.
My "line" is a simple .png of a rectangle that is 3px tall and 100px wide. It will be stretched and rotated appropriately between the two objects.
I know I need to get the distance between the display objects using square root, and the angle between them using atan2.
I don't have a problem with any of that, my problem is that I cannot figure out the correct x and y of each object because they are all in different display groups.
My situation is this:
I have 3 Display Groups: Dot1Group, Dot2Group, and LineGroup.
dot1 is a display object in the dot1Group.
dot2 is a display object in the dot2Group.
myLine is a display object in the lineGroup.
Dot1Group and Dot2Group are both moving around and rotating.
I'm just trying to stretch the line between the two dots.
If they were all in the same display group it wouldn't be a problem, but this is breaking my mind.
Any help is very much appreciated!