3.16. Grouping Elements

Problem

You want to bind together a collection of elements as a group; or, you want to prevent drawn lines and shapes from cropping, unioning, and punching one another.

Solution

Choose Modify → Group, or convert the collection of elements into a symbol.

Discussion

You can group a collection of entities into a single item, by choosing Modify → Group. When grouped, you can no longer edit the elements individually. For example, when grouped, you cannot directly edit text, change a fill, or reshape a line.

To modify an individual element within a group, you have to edit the group. To do so, double-click the group. The group opens, and you can modify the group, in a mode akin to symbol editing mode. When you are finished, you can return to the main stage by choosing Edit → Edit All.

Grouping is impermanent; you can ungroup a group at any time by selecting Modify → Ungroup. You can also nest groups. To do so, select an existing group and any other element, and choose Modify → Group. The original group is preserved within the new group, as a nested group.

Though grouping can be a convenient feature, especially when drawing complex art, it has no architectural benefit. In contrast, you can use graphic, button, or movie clip symbols as a way of grouping elements, and when you do, you realize all the benefits of using symbols. For example, if you group a collection of items as any type of symbol, you can apply motion tweens to it. If you group a collection of items as a movie ...

Get Flash 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.