• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Lesson 12. Sprite Properties and Palettes > Modifying Sprite Properties

Modifying Sprite Properties

You've seen that you can set the location of sprites by opening the Property Inspector dialog box and entering values for the sprite's X and Y coordinates. On that same tab, you can change the width and height of a sprite. In the next task, you'll make the Line sprite thinner.

Select the sprite in channel 3 and then choose Modify > Sprite > Properties.

The Property Inspector appears with the Sprite tab selected. To the right of the X and Y coordinates are the width and height settings.

Figure .

Set the height (H) field to 2.

The Line sprite is resized. This makes the line only 2 pixels high and less obtrusive on the screen.

Another method for changing a sprite's proportions is the use the Scale Sprite dialog box. This method is more useful when you want to scale a sprite in both width and height while maintaining the original proportions.

With the Sprite tab still selected, click the Scale button at the bottom of the Property Inspector.

The Scale Sprite dialog box appears. With the Maintain Proportions check box checked, the sprite can be easily changed in size without distorting the image. You could, for example, set the scale to 50% and the sprite will be one fourth as big (one half as wide and one half as tall). If you change the height here, the width will be changed as well to maintain the proportions. You wanted to change only the height of the Line sprite, so you used the Property Inspector instead.

Figure .

Click Cancel to close the Scale Sprite dialog box.

In the remaining steps of this task, you'll create a new cast member right on the stage. Then you'll use the Property Inspector dialog box to change the location and size of other sprites you place in the score using this single cast member.

Click channel 11, frame 15, in the score to move the playback head to frame 15.

This ensures that the new sprite you want to create will appear in the correct frames.

Choose Window > Tool Palette to open the tool palette.

In a previous lesson, you used the Push Button tool from the tool palette. This time you will use one of the shape tools. The shape tools (Line, Filled Rectangle, and so on) don't provide the same capabilities for creating images as the tools in the Paint window, but they are designed to be very efficient in a Director creation. Shapes are generally smaller and animate faster than similar images created using some other procedure.

Figure .

Set the foreground chip of the tool palette to the same color you used for the Line sprite.

The palette index for the color is 19 for Windows and 17 for the Macintosh.

Select the Filled Ellipse tool in the tool palette and then create a small circle on the stage at the left end of the Line sprite. Use the following illustration as a guide for the location of this new element.

To draw a circle using the Ellipse tool, hold down the Shift key while you drag the mouse. This constrains the shape to a circle rather than an oval.

Figure .

You'll use this small circle as a design element on the stage. The filled ellipse is added to the cast when you create it. The icon in the lower-right corner of the thumbnail image is the icon for a shape cast member.

In the cast, select the filled ellipse cast member you just created. Then type Dot in the Cast window's Name field and press Enter (Windows) or Return (Macintosh).

Figure .

Naming cast members is a good habit to get into so you or someone else can easily locate them later.

Reselect the Dot sprite on the stage, choose Modify > Sprite > Properties, and note the Y coordinate of the sprite.

You're going to add another Dot sprite at the other end of the Line sprite. Knowing this top coordinate will help you align the two sprites in the next steps. Write this number down for later reference.

Drag the Dot cast member from the Cast window into channel 12, frame 15. Then drag the sprite to a position on the stage at the right end of the Line sprite.

Figure .

With the sprite still selected, choose Modify > Sprite > Properties and enter the same Y coordinate you noted in step 10.

Now the two Dot sprites are aligned horizontally.

Drag the Dot cast member to channel 13, frame 15. Choose Modify > Sprite> Properties and set the width and height both to 10. Then set the location to 160,110.

Look at the stage to see where you have placed this new Dot sprite, which is a different size than the others.

Figure .

Entering these new properties resizes and relocates the sprite. As you can see, the Sprite Properties dialog box is very useful. You will be using it frequently in your Director development.


All objects created with the tool palette tools can be modified as sprites on the stage without affecting the parent cast member. Note that Director can much more quickly display resized objects that are created using the tools in the tool palette than it can resize imported graphics or ones created with the paint tools. Reusing the same cast member also saves storage space. Once the cast member is on the stage, you can resize the sprite or change any of its attributes, and it will look like a different cast member entirely.

All the sprites that make up the main menu are now on the stage and sequenced in the score.

Figure .

To complement the front-end of the multimedia art gallery, you'll next create a beginning for the movie using a logo and a sound. In the next two lessons, you'll create the screens and navigation scripts that will allow your viewers to see what's in the presentation.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint