Using Director > Sprites > Changing the appearance of sprites > Resizing and scaling sprites |  |

Resizing and scaling sprites

You can resize sprites directly on the Stage by dragging their handles. To resize the sprite precisely, you can enter coordinates or scale sprites by a specified percentage in the Sprite tab of the Property Inspector. You can also set the sprite's size with Lingo.

Changing a sprite's size on the Stage doesn't change the size of the cast member assigned to the sprite, nor is the size of the sprite affected if you resize its cast member.

In some cases, resizing bitmap sprites can cause noticeable delays. If a bitmap sprite must be a particular size, make the cast members displayed in the sprite the proper size. You can do this with Modify > Transform Bitmap or in any image editing program. Scaling and resizing sprites works best with vector shapes.

Note: The procedure for resizing a rotated or skewed sprite is different from the procedures that follow. See Rotating and skewing sprites.

To resize a sprite by dragging its handles:

1 | Select the sprite.
2 | On the Stage, drag any of the sprite's resize handles. Hold down Shift while dragging to maintain the sprite's proportions.

To scale a sprite by pixels or by an exact percentage:

1 | Select the sprite you want to scale and click the Sprite tab of the Property Inspector (Graphical view).
2 | Click the Scale button.
| The Scale Sprite dialog box appears.
3 | Enter new values to scale the sprite by doing one of the following:
| Specify a pixel size in the Width or Height field. If Maintain Proportions is selected, all of the updatable fields adjust to reflect the new scaled size. If Maintain Proportions in not selected, you can specify new proportions in the Width and Height fields.
| Enter a percentage in the Scale field.
4 | Click OK.
| The sprite is scaled relative to its current size, not to the size of its parent cast member.

To restore a sprite to its original dimensions, do one of the following:

| On the Sprite tab of the Property Inspector (Graphical view), click Restore All.
| Choose Modify > Transform > Reset Width and Height or Reset All.

To resize a sprite's bounding rectangle with Lingo:

Set the sprite's `quad` or `rect` sprite property. See `quad` or `rect (sprite)`.

The `rect` sprite property determines the coordinates of a sprite's bounding rectangle. The coordinates are given as a `rect` value, which is a list of the left, top, right, and bottom coordinates.

To change a sprite's height or width with Lingo:

Set the `height` or `width` sprite property. See `height` and `width`.