Hold the Control key as you click the elements you want to group, then right-click the selection and choose "Pre-compose" followed by "Fit Elements". You can also use the keyboard shortcut Control + Shift + C.
Most of the time, choosing "Fit Elements" will suffice, since it simply creates a composition large enough to hold all the elements. The other options are as follows:
Flow Direction specifies the direction in which the elements are laid out when their corresponding position property (x or y) is set to "auto".
Set Loop to "True" to create a repeating composition. Use it along with Plays to set the number of repetitions.
Right-click the composition and choose "Flatten".
Double-clicking an element will focus the editor on the composition it is part of.
In the same way that HTML pages flow from top to bottom, your elements can be positioned automatically based on their order in the composition.
You can achieve this by setting the elements' x and y positions to "auto". The elements will now be positioned relative to each other, rather than at a fixed location. Combined with an auto-sizing composition (set its width and height to "auto"), you've got a layout that automatically adapts to its contents.
In order to set this up, right-click a selection of elements, then choose "Pre-compose" and "Vertical Flow". As a result, whenever you change the size of any element within the composition, its height and element placement will also change.
The difference between "Horizontal Flow" and "Vertical Flow" is the direction in which the elements are laid out. This can also be set with the Flow Direction property of the composition.
To make an element's position absolute again, simply change the x and y positions to anything other than "auto". It is also possible to do this by right-clicking the element, then selecting "Position", then "Absolute".
When selected, you can tell whether an element is relatively positioned by its outline color. A blue outline indicates an absolute element, whereas a green outline indicates a relative element.
It is possible to set a composition to loop over time, enabling you to define an animation only once, then repeat it as often as you want. To do this, you need a composition with a fixed duration (a duration of "auto" won't work), then you set Loop to "True". Plays allows you to set how many times it repeats. It will play endlessly when set to "auto".
Examples of looping compositions are provided in several demo templates (click New under Templates). An animated background is one of the most common uses.