User Guide
920 ActionScript classes
You can think of the eight regions outside of the center (defined by the rectangle) as being like
a picture frame that has special rules applied to it when the movie clip is scaled.
When the
scale9Grid property is set and a movie clip is scaled, all text and child movie clips
scale normally, regardless of which regions of the scale9 grid they are located in; however, for
other types of objects the following rules apply:
■ All content in the center region scales normally.
■ Any content in the corners are only scaled when the center region is scaled to 0.
■ Any content in the top and bottom regions scale only horizontally. Content in the left-
hand and right-hand regions scale only vertically.
■ All fills (including bitmaps, video, and gradients) are stretched to fit their shapes, and all
fills (including bitmaps, video, and gradients) are stretched to fit their shapes.
If a movie clip is rotated, subsequent scaling is normal (and the
scale9Grid property is
ignored).
For example, consider the following movie clip and a rectangle that is applied as the movie
clip's
scale9Grid property:
When the movie clip is scaled or stretched, the objects within the rectangle scale normally, but
the objects outside of the rectangle scale according to the
scale9Grid rules:
The movie clip. The red rectangle
shows the
scale9Grid.
Scaled to 75%:
Scaled to 50%: