Including Your Blackjack Game in
How to Lingo

Revised November 7

The Blackjack game poses fewer problems than the arcade prototype, but you'll still need to surmount a few challenges in adding it to your final project. Here's some advice.

First, note that the procedure described here does NOT tell you to launch more than one instance of Director. That is, it tells you to have ONLY ONE FILE OPEN AT A TIME. This is the ONLY way to do what we're describing.

Open your finished Blackjack game and bring up the Cast. Select all the Cast Members. Right-click and choose Copy Cast Members. Now open your How to Lingo movie. Open the Cast, select the last slot, and paste in the copied Cast Members.

Re-open your Blackjack game. Open the Score. Copy all the sprites, including those in the Behavior Channel. Re-open your How to Lingo movie and paste the copied sprites below the marker for your Blackjack scene.

The Blackjack game uses several subsidiary markers. These won't come along in the previous cut and paste operation, so you'll need to rebuild them. In order, the markers are: "busted," "winner," and "houseWins." Position each one above one of the sprites that contains an outcome field. It should be easy to see which these are.

There should be "go to the frame" controls at four points in your scene: below the initial "blackjack" marker (to hold on the first frame), and at each of the outcome frames. These sprites should have come along in the cut and paste, but you'll have to rebuild them if you forgot.

Save How to Lingo. Now you need to import the scripts that run your game. Go back to your Blackjack source file and open the main movie script in the Cast. Select the CONTENTS of the startMovie handler -- NOT including the lines "on startMovie" and "end startMovie". Copy this text and return to How to Lingo

Open the main movie script of How to Lingo in your Cast. Find the startMovie handler. Insert some blank lines and type a comment that says "-- Blackjack game code here". Following this comment, paste in the text you copied from your Blackjack source. Save your movie.

The Blackjack game depends on a number of custom handlers. These too must be transferred. Re-open your Blackjack source, return to the main movie script, and select all the custom handlers. Return to How to Lingo, open the main movie script there, and paste in the custom handlers below the end of your startMovie handler. Save your work.

Open the Cast of How to Lingo and find the "Play Again" button, which should have been automatically copied into your movie by earlier operations. Open the Cast Member Script of this button. Change the script to the following:

startMovie()
go to 1

This change means that "Start Again" will return the player to the main menu of How to Lingo, which is not perhaps the most elegant solution; but it does work and is acceptable for this assignment.

One more small adjustment and you're done. Though your design may avoid this problem, in some cases the "Quit" and "Main Menu" buttons may overlap the display field that shows the value of the dealer's cards. If this is the case, move that field, and the corresponding field for player's card values, to a more visible part of the screen. Remember to have the entire sprite selected while moving.

Save and test. Your game should work perfectly.


University of Baltimore Logo

Copyright © 2003 School of Information Arts and Technologies