Type Function Library display.* Return value GroupObject Revision 2017.3060 Keywords groups, objects, grouping See also Group Programming (guide)
Creates a display group for organizing/layering 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 the Group Programming guide for more information.
Using groups with the physics engine has some limitations — see the Physics Notes/Limitations guide.
display.newGroup()
-- 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 )