As I mentioned earlier I have a hard time translating some coordinates between the event coordinates and the StageBounds of groups.
The reason for this seems to be that the groups are not "moving" but changing anyway if stuff inside is changed. Strange effects to me...
My problem consists of an area (checkerboard style) which needs to translate my touch to one of 25 fields into the fields number.
To find the right field I am using the top left corner of the group, divide by the width/height of the fields multiply by cells .. add one .. pretty simple stuff..
But inside there are animations and the top left corner given by StageBounds of the group is changing all the time which introduces errors of course.
I just found a pretty cool solution for these kind of problems!
1. Adding a display.newRect() of the "supposed" size of the playfield as first element in the group (not setting any fillColor)
2. Asking for the stageBounds of this invisible rectangle instead of the group itself. Like using "group[1].stageBounds" instead of "group.stageBounds"
Works superb... I just made that thing rotate and scale.. and everything inside mode.. and still every touch calculates right! yeah!
P.S.: I hope the section of the forum is ok for this.. even if there is not really code with that one!