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

Lesson 24. Using Lists and Multiple Cast... > Creating a Template Layout in the Sc...

Creating a Template Layout in the Score

Your next step is to create a basic layout—a template—for the page elements: a background, a headline, a picture of the peppers, and navigation buttons. You will create only a single section of the score using the FreshPpr cast.

Open the score and the Main cast. Click frame 27 to see all the basic elements that are already in place for you.

Figure .

This cast includes a background image (cast member 1) covering the entire stage, a navigation panel that appears along the bottom of the page (cast member 4), and four button labels: Quit (cast member 5), Help (cast member 6), Previous (cast member 7), and Next (cast member 8). The Main cast contains a movie script (in cast member 2), which you will need later; it also contains the frame script (cast member 3) for frame 27, which contains an exitFrame handler with a go to the frame command to keep the playback head looping in this frame.

In the score, adjust the duration of the background sprite in channel 1 so it ends at frame 11 instead of frame 27.

Figure .

This change makes room for a background that will come from the FreshPpr cast.

Open the FreshPpr cast.

Drag cast member 1 (fbackground) from the FreshPpr cast to channel 1, frame 12, of the score.

This command centers the background graphic from the FreshPpr cast on the stage.

If necessary, adjust the duration of the fBackground sprite so it ends in frame 27.

Now you have a background in frames 2 through 11 that comes from the Main cast and a background in frames 12 through 27 that comes from the FreshPpr cast. In this case, the background graphics are identical, so users will not notice any difference as the playback head moves from one background to the next. However, this score structure gives you the flexibility to change the background for individual pages in the catalog if you so desire.

Figure .

Notice that the background in the Main cast is named mBackground (for Main Background), and the background in the FreshPpr cast is named fBackground (for FreshPpr Background). Also notice the same naming convention has been applied to the other cast members. This convention helps you quickly identify where a cast member came from just by looking at its name in the score.

Drag the Fresh Peppers heading (cast member 2) to the score and place it in channel 7, frame 15. If necessary, adjust its duration to span frames 15 through 27.

Make sure to drag the cast member into the score, not onto the stage. The cast member has been set up so that dragging it into the score automatically positions it correctly. (This positioning works because of the cast member's registration point, which you will learn about in a task later in this lesson.)

Why start at frame 15? Notice in the score that the elements are appearing on the stage in phases: first the background in frame 12, then the navigation panel in frame 13, and then the button labels in frame 14. The elements that make up each page of the pepper catalog will appear last, at frame 15. Your score should look like this:

Figure .

As you saw when you examined the casts earlier, all the corresponding elements are exactly the same size. Later, using Lingo, you will switch the elements from the FreshPpr cast with elements from the DriedPpr and PeprCorn casts. The precise alignment ensures that, when the new cast members appear on the stage, there will be no screen jumping.

Drag the rest of the elements from the FreshPpr cast into the score, starting at frame 15 and extending to frame 27:

Channel 8: cast member 7, fPicture

Channel 9: cast member 3, fQuit

Channel 10: cast member 4, fHelp

Channel 11: cast member 5, fPrevious

Channel 12: cast member 6, fNext

Again, make sure to drag the cast members into the score, not onto the stage. The cast members have been set up so that dragging them into the score automatically positions them correctly.

When you're finished, the stage and score should look like this:

Figure .

Save your work. Then rewind and play the movie.

Watch the playback head. You now see the elements from the FreshPpr cast appear on the stage at frame 15.

So far, so good: you have a basic layout that works well for the elements stored in the FreshPpr external cast. If you had some way to replace those elements with the corresponding elements from the DriedPpr or PeprCorn cast, the new elements would drop right into place, because as you saw, they are stored in the same slots within their cast and are the same size as their cousins in the FreshPpr cast. This is a job for Lingo!



Not a subscriber?

Start A Free Trial

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