72
Chapter 3: 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 text boxes. If Maintain Proportions is selected, all
the updatable text boxes 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.
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 in the Property inspector (Graphical view), click Restore All.
•
Select Modify > Transform > Reset Width and Height or Reset All.
To resize a sprite’s bounding rectangle with script:
•
Set the sprite’s
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 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 script:
•
Set the
height
or
width
sprite property. For more information about these properties, see the
Scripting Reference topics in the Director Help Panel.
Rotating and skewing sprites
You can rotate and skew sprites to turn and distort images and to create dramatic animated
effects. You rotate and skew sprites on the Stage by dragging. To rotate and skew sprites more
precisely, use Lingo or JavaScript syntax or the Property inspector to enter degrees of rotation or
skew. The Property inspector is also useful for rotating and skewing several sprites at once by the
same angle.
Summary of Contents for DIRECTOR MX 2004-USING DIRECTOR
Page 1: ...DIRECTOR MX 2004 Using Director...
Page 16: ...16 Chapter 1 Introduction...
Page 82: ...82 Chapter 3 Sprites...
Page 98: ...98 Chapter 4 Animation...
Page 134: ...134 Chapter 5 Bitmaps...
Page 242: ...242 Chapter 10 Sound and Synchronization...
Page 274: ...274 Chapter 11 Using Digital Video...
Page 290: ...290 Chapter 12 Behaviors...
Page 302: ...302 Chapter 13 Navigation and User Interaction...
Page 334: ...334 Chapter 15 The 3D Cast Member 3D Text and 3D Behaviors...
Page 392: ...392 Chapter 16 Working with Models and Model Resources...
Page 418: ...418 Chapter 18 Movies in a Window...
Page 446: ...446 Chapter 22 Managing and Testing Director Projects...