Type Function Library display.* Return value GroupObject Revision Current Public Release (2013.2100) Keywords groups, objects, grouping See also Display Groups and Coordinates
Creates a group in which you can add and remove child display objects. Initially, there are no children in a group. The local origin is at the parent's origin; the anchor point is initialized to this local origin.
See Display Groups and Coordinates for more information.
Using groups with the physics engine has some limitations — see the Physics Limitations guide.
Create a rectangle and a group, then insert the rectangle into the group:
local rect = display.newRect(0, 0, 100, 100) rect:setFillColor( 0.5 ) local group = display.newGroup() group:insert( rect )