Changing a sprites size on the Stage does not change the size of the cast member that is assigned to the sprite. The size of the sprite is not affected if you resize its cast member.
In some cases, resizing bitmap sprites can cause noticeable delays. If a bitmap sprite must be of a particular size, properly size the cast members that appear in the sprite. You can do this with Modify > Transform Bitmap or in any image-editing program. Scaling and resizing sprites works best with vector shapes.
The procedure for resizing a rotated or skewed sprite is different from the following procedures. For more information, see Rotating and skewing sprites
Resize a sprite by dragging its handles
- Select the sprite.
- On the Stage, drag any of the sprites resize handles. To maintain the sprites proportions, hold down Shift while dragging.
Scale a sprite by pixels or by an exact percentage
- Select the sprite you want to scale and click the Sprite tab of the Property inspector (Graphical view).
- Click the Scale button.
- In the dialog box, enter new values to scale the sprite by doing one of the following:
- Specify a pixel size in the Width or Height text boxes. If Maintain Proportions is selected, all text boxes that can be updated adjust to reflect the new scaled size. If Maintain Proportions is not selected, you can specify new proportions in the Width and Height text boxes.
- Enter a percentage in the Scale text box.
- Click OK.
The sprite is scaled relative to its current size, not to the size of its parent cast member.
Restore a sprite to its original dimensions
Do one of the following:
- On the Sprite tab in the Property inspector (Graphical view), click Restore All.
- Select Modify > Transform > Reset Width and Height or Reset All.
Resize a sprites bounding rectangle with script
- Set the sprites quad or rect sprite property. For more information about these properties, see the Scripting Reference topics in the Director Help Panel.
The rect sprite property determines the coordinates of a sprites bounding rectangle. The coordinates are given as a rect value, which is a list of the left, top, right, and bottom coordinates.
Change a sprites height or width with script
- Set the height or width sprite property. For more information about these properties, see the Scripting Reference topics in the Director Help Panel.