Note About This Book: Advanced Lingo For Games was written by Gary Rosenzweig in 2000 for users of Macromedia Director 7. It is presented here for free on an as-is basis, with no updating. Most of the information and code here can be used in the most recent version of Director. The book has been reproduced from the final editing files archived in 2000, and not the final proof galleys. So some minor differences between this version and the printed version my exist. The entire contents of this book are Copyright 2000, Gary Rosenzweig. No part may be reproduced or copied without written permission. The text here is provided for individual use only.
Want to thank me for making this book available for free? Just buy Special Edition Using Macromedia Director MX and we'll call it even!

Advanced Lingo For Games
by Gary Rosenzweig


Chapter 5 Section 3

Putting It All Together

For organizational purposes, place the puzzle pieces in a separate cast library. You can even make this an external cast library, which would make it easy to swap out with a new puzzle later on.

Then, drag and drop all the puzzle piece members from the Cast to the Score at once. They will probably all be set to "copy" ink, so select them all again and change them to "background transparent" ink. Now, if your registration points are set correctly, you should be able to see the completed puzzle on the Stage.

Move the sprites in the Score so that they are positioned where you want them. You may want to start them at sprite channel 11 or thereabouts, so you have a few sprite channels left for items that will appear under the pieces as they move about.

Then, drag and drop the "Jigsaw Puzzle Frame Behavior" to the frame script channel. You are prompted for the first and last sprite channel numbers, so enter those.

Now, select all the puzzle pieces again, and use the script pop-up menu at the top of the Score window to add the "Jigsaw Puzzle Sprite Behavior" to all of them at once. Enter a link sound, if any, and a game over frame. You can also change the closeness property. If you need to change these values later on, the best way is to select all the sprites, remove the behavior, and then add it again. This way, all the parameters can be set at once.

Now the game is ready to go. Remember to create your game over frame and your link sound.