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

Lesson 24. Using Lists and Multiple Casts > Moving Assets to an External Cast

Moving Assets to an External Cast

Now that you've created the Main external cast, you will move the movie's prebuilt assets there. Doing so will enable you to update the movie's contents without having to update the movie file itself. This task will also help you understand how such an updating scheme works.

Open the score to familiarize yourself with its layout. Click the sprite in channel 1 and note that the upper-left area of the sprite toolbar indicates the cast in which the sprite's cast member is stored.

Figure .


If you don't see the sprite toolbar in your score, make sure the score is the active window and then choose View > Sprite Toolbar (Windows Ctrl+Shift+H, Macintosh Shift+Command+H).

If you click the sprites one by one, you'll see that the score consists entirely of cast members currently stored in the Internal cast.

Play the movie.

Notice the different elements: the background appears first, then a transition to a navigation panel, followed by another transition to show labels for the navigation buttons (you will add the actual buttons later). A behavior in frame 27 pauses the playback head.

Choose Window > Cast > Internal to open the Internal Cast window.

Figure .

Once again, notice that the Internal cast contains all the movie's assets. Remember that the cast stores not only the elements you see on the stage but also the scripts and transitions that make up the action.

Choose Window > Cast > Main to open the Main cast in its own window. Then arrange the Internal and Main Cast windows side by side.

Figure .

You will now move the contents of the Internal cast to the Main cast.

In the Internal cast, click cast member 1, Shift+click cast member 11 to select all the cast members in the Internal cast, and drag the cast members to the Main Cast window.

Figure .

Make sure your mouse pointer is over cast member 1 in the Main Cast window when you release the mouse button. If the cast members drop into the Main Cast window in another position, drag them into the position shown here. Repositioning the cast members will make it easier for you to compare your work with the illustrations shown later in this lesson.

In the score, click channel 1 and note that the sprite toolbar now indicates that the cast member is stored in the Main cast.

Figure .

If you click the sprites one by one, you'll see that the score now consists entirely of cast members currently stored in the Main cast.

Choose File > Save All. When Director asks you to choose a location for the Main cast, select your Projects folder (not the new Work folder) and then click OK.

Your movie consists of two separate files now: the movie file, Catalog.dir in the Work folder, and the linked external cast, Main.cst in the Projects folder. Choosing Save All ensures that changes you made to both files are saved. Because this is the first time you've saved since creating the Main cast, Director wants you to confirm where the cast should be stored before it creates the actual physical file on your computer's hard drive. Be sure to save the cast in your Projects folder. Your movie will remember the location where you saved the cast, and your movie will look for the cast in that location whenever it runs in the future.

You will now see how this external cast setup allows you to update the movie's content without actually changing the movie file.

Choose File > New > Movie (Windows Ctrl+N, Macintosh Command+N).

To prove the point of the following exercise, you don't want the Catalog.dir movie to be active during the next steps, because you want to see how you can edit an external cast separately from the movie to which it is linked. Creating a new, blank file closes the Catalog.dir movie (the File > Close command is not available for a movie file; to stop using a movie file, you create a new file, open another file, or quit Director).

On your computer's desktop, make a copy of the Main.cst file and place it in your Work folder. Leave the original Main.cst file in your Projects folder.

You're going to edit the version of Main.cst in your Projects folder. The copy in the Work folder is a backup you will need to restore the cast to its correct form later.

Back in Director, choose File > Open to display the Open dialog box. Select the Main.cst file in the Projects folder and click Open.

Notice that the window's background is a darker gray than usual, which is Director's way of reminding you that the cast is not linked to the current movie.

Figure .

You're going to edit the Main cast file separately from the movie it's attached to.

Double-click cast member 1, the background graphic, to open it in the Paint window. Make any change you like.

You're going to discard this changed version of the Main cast later, so have fun. In the illustration shown here, a block of text was placed over the graphic.

Figure .

Choose File > Save and then close the Main Cast window.

You need to save the changes so that when you open the Catalog.dir movie, those changes will be available to it.

Open and play your Catalog.dir movie from the Work folder.

Now you see the revised version of the background graphic.

Figure .

By editing the Main cast separately from the movie, you have actually changed the movie's content. Now you want to restore the correct version of the background graphic.

Close the Catalog movie file again by choosing File > New.

On your computer's desktop, remove the edited version of Main.cst from your Projects folder. Then drag your backup copy of Main.cst from your Work folder into your Projects folder.

To be on the safe side, don't delete the unneeded version of Main.cst until you're sure you've switched the two versions of the casts correctly.

Open and play your Catalog.dir movie again.

The original background graphic is now back in place.

From this exercise, you can see how you can change the movie's background graphic without actually changing the movie file itself. You merely edited the graphic in the movie's linked, external cast, and the movie automatically reflected those changes the next time it ran. With all the graphics, scripts, and transitions stored in an external cast, you can change the entire look and feel of the movie just by editing the cast members.

Your movie contains the basic layout for the electronic catalog: a generic background and navigation buttons. Now it's time to start adding the elements you need for the pages in the catalog.



Not a subscriber?

Start A Free Trial

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