Hey all.
Lets say you have a sitation where you have
stage
--container1 {30, 30}
--container2 {-10, 50}
--container3 {100, 100}
Where container is a display object and {} is its position.
Essentially what i need to be able to do translate container3 to the stage equivalent and back again but i have no idea how to do this.
You can work out that the stage equivalent of container3 is:
30-10+100 = 120;
30+50+100 = 180;
So container3s position on the stage is {120, 180}
I know about GlobalToLocal and LocalToGlobal but i cant use them because i dont get it. Is this an example of when GlobalToLocal and LocalToGlobal is useful?
The problem si because when i click and start to drag container3, it ends up appearing in a weird position when i move it to stage co-ordinates (so the drag can happen freely)…
Thanks.