Like I have a director scene, thats a localGroup. I have several child displayGrops
Below is what I’m doing, seems it sometimes messed up my whole layout.
local childGroup = display.newGroup()
local element1
local element2
element1:setReferencePoint(display.CenterReferencePoint)
element2:setReferencePoint(display.CenterReferencePoint)
element1.x = xxx; element1.y = xxx
element2.x = element1.xxx +/- xxx; element2.y = element1.y +/-xxx
childGroup:insert(element1)
childGroup:insert(element2)
childGroup:setReferencePoint(display.CenterReferencePoint)
childGroup.x = \_W / 2; childGroup.y = \_H / 2
localGroup:insert(childGroup)
I wonder if I am on the right track? If not, can anybody show me the right steps of creating a childGroup and locate the elements in this group. Oh, as well as locate the childGroup.
Also I’m confusing about when should I set the reference point, before or after being inserted into the group?
Thanks in advance! [import]uid: 4187 topic_id: 22693 reply_id: 322693[/import]