Before getting started, I should mention the Starting File, portfolio_start, on the included CD. You should have the portfolio movie from the previous lesson available to open, but if you don'tor if you just decided to start at this lessonyou can open and use the portfolio_start movie from the CD. If you do use the file from the CD, make a dmx2004_source folder on your hard drive, and then create a project_one folder within it, to save the portfolio movie into. You can save the movie as just portfolio on your hard drive.
When the portfolio movie is open, let's get started. The first thing you'll be doing is importing the button graphics that will replace the invisible rectangles that are being used now.
To allow you to organize your movies, Director lets you create as many casts as necessary. Let's create a new cast for the buttons.
Using the Cast panel's Choose Cast button, pick New Cast. In the New Cast dialog, make sure Internal Storage is chosen, and name the cast buttons.
After you press Create to create the new cast, it appears in the Cast panel as a new tab. At this point, you may be wondering what the difference is between an internal and an external cast. An internal cast is stored with your movie, in the same file, and any assets in an internal cast are available to that movie only. With an external cast, the cast is a separate file on your hard drive (a .cst file, if you're on Windows). When you publish your movie, or give it to someone else to be edited, any external cast files must be included with the movie file. The benefit of using external casts is that they can be shared by different movies. You can link any external cast to any movie you're working on. Many developers use this feature to store common Lingo scripts and graphics, so they can be used in any movie.
Right-click in the first empty member slot and choose Import from the contextual menu that appears. Or choose File > Import from the top menu.
The import file dialog box will appear, and should be titled Import Files into Buttons. Navigate to the media folder in the Lesson03 folder on the CD, and import the six button images. (They are prefixed by btn.)
Recall that to select a range of images, you can click the first image in the series, then hold Shift and click the last image.
With all six images highlighted, click the Import button in the dialog box.
The Image Options dialog appears allowing you to customize the import of each image. Set the color depth to 24 bits, then choose Same Settings for Remaining Images.
When ready, click OK and the six button images will be imported into the new buttons cast.
Use the Choose Cast button in the Cast panel, to make another new cast. Make it an internal cast, with the name sound.
After creating the new cast, import the four .aif sound files from the Lesson03\media folder on the CD.
As before, single-click the first sound file to highlight it, then Shift-click the last file to select the range of four. This time, when you press the Import button in the dialog, the files just appear in the cast; no options dialog appears, because these are sound files, not bitmaps.
You can listen to any of the imported sounds by selecting one of the sound cast members, and then choosing the Sound tab within the Property inspector. Within the Sound tab are Play and Stop buttons, along with information on the selected sound.
Finally, use the Choose Cast button one last time, to make the final new cast. Make it an internal cast, with the name art.
This final cast will serve to hold the artwork displayed on the stage when the curtains open.
Import the three .png files from the media folder that begin with growth. These files don't have any alpha channel, so you can import them at 24 bit.
As I mentioned earlier, when you're using bitmaps without an alpha channel it's a good idea to transform the bitmaps to 16 bit to conserve file space and make the images load quicker.
When you're importing, always check the media option at the bottom of the Import Files Into dialog to be sure it's set to Standard Import and not Link to External File. You now have assets for the portfolio in four different casts. All the assets could have been imported into one single cast, but using four helps keep the project more organized. You can, and should, use as many casts as you feel are necessary to properly organize your project. I typically only use the default internal cast for base graphics like the background, and then make additional casts as needed.
In Lesson 11, when you create the 2D Space Shooter game, you will learn about using linked media in your casts. But for now, let's move on to creating the real project buttons for the portfolio.