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

Lesson 12. Sprite Properties and Palettes > Setting the Location of a Sprite

Setting the Location of a Sprite

Next you'll start adding elements to the stage. In this task, you will set the location of some sprites on the stage by defining exact locations using the Sprite Overlay and the Property Inspector, which both help you set sprite properties. To begin defining the menu screen for this presentation, you'll first center the image for the main menu in the score by dragging it from the cast to the score, just as you've done in previous lessons. Then you'll use other Director features to position the remaining sprites you add to the score.

Drag cast member 3, MainMenu, from the cast to channel 1, frame 15.

Start building this main menu in frame 15 so there is room at the beginning of the score to place a logo and sound for the introduction to the movie. The MainMenu image contains a title for the multimedia art gallery you're going to create. The white rectangle marks the location where you'll soon place the next sprite.

Figure .

When you dragged the MainMenu cast member to the score, Director centered it on the stage. While the cast member is still selected, you can see that it does not completely cover the stage.

In the score, Director added the MainMenu sprite with a 13-frame duration, which you specified earlier as your sprite preference. Notice also that you can see the cast member number and name in the score, which you specified as your cast preference.

Drag cast member 4, Fingerhoney, onto the stage so it appears in the lower-right corner of the stage.

Figure .

In the score, a 13-frame sprite is inserted into channel 2, frame 15, just beneath the 13-frame sprite in channel 1. Director placed the playback head in frame 15 when you dragged the MainMenu cast member to this frame in channel 1; Director then placed the start frame of the sprite you dragged onto the stage in the current frame—frame 15—of the next available channel.

Figure .

In the following steps, you'll use a new feature to move this sprite into position on the stage. When you're finished, this sprite will appear over the white rectangle.

Choose View> Sprite Overlay> Show Info (Windows Ctrl+Shift+Alt+O, Macintosh Control+Shift+Command+O).

On the stage, a gray box containing information about the selected sprite appears. This is the Sprite Overlay. The Sprite Overlay displays the most important sprite properties directly on the stage. The information displayed in this panel consolidates information about the sprite that you would normally see only by opening various dialog boxes or choosing menu commands.

Figure .

The Sprite Overlay panel is now active for the selected sprite. By default, the Sprite Overlay feature displays a panel only for the selected sprites. By choosing View > Sprite Overlay > Settings, you can select a setting that displays sprite information for all sprites on the stage or only when you move the cursor over a sprite. The color chip labeled Text Color allows you to change the color of the text in the Sprite Overlay. When the Sprite Overlay is difficult to read because of the background color, you can use the color chip to select a more readable color. For the current black background, you might find it easier to use a white or bright yellow color.

Figure .

Three lines are displayed in the Sprite Overlay. The first line gives information about the sprite's cast member. Clicking the Cast Member Properties icon at the left of the top line accesses the Property Inspector with the tab set to view properties relating to the cast member. This is the same view of the Property Inspector that you get by clicking the cast member in the cast and then clicking the Cast Member Properties button there.

Figure .

The information associated with the second icon describes the channel number where the sprite is located and the sprite's location coordinates, ink setting, and blend setting (the percent of opacity of the image). Clicking the Sprite Properties icon at the left of the middle line also brings up the Property Inspector, but with the tab selected for viewing or modifying information about the sprite. The third line, which is blank for now except for the icon, gives information about any behaviors attached to the sprite. Clicking the Behavior Inspector icon will open the Property Inspector with the Behavior tab selected.

Click the Sprite Properties icon to open the Property Inspector. Use the List View Mode button to view the Property Inspector in the graphics view.

The lower half of the Property Inspector contains location fields labeled X and Y. You can use these fields to set the location of a sprite relative to the sprite's registration point. These fields are called the Reg Point Horizontal and Reg Point Vertical fields.

In the Property Inspector, set the value for the X location field to 246. Set Y equal to 162.

You looked at registration points using the Paint window in Lesson 4. The registration points for the Fingerhoney cast member is in the center, so the values you set define the distance from the sprite's center to the left edge of the stage (the X value) and to the top of the stage (the Y value). The location values position the sprite over the white rectangle of the MainMenu sprite with a single-pixel white border on three sides. The artist who designed these graphics and who divided them into separate cast members kept notes about the coordinates where each element should be positioned. This sort of pixel-perfect placement is common in well-designed Director projects.

Figure .

Remember that the stage size is not necessarily the same size as the screen. Recall that you set the stage size in the Modify > Movie > Properties dialog box. The X and Y fields set the location of the sprite relative to the upper-left corner of the stage, not the upper-left corner of the screen.



Not a subscriber?

Start A Free Trial

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