8bitrocket.com
3May/101

Essential Guide To Flash Games Errata F.A.Q.

Unfortunately when you write a book, some things get lost in the translation from manuscript to the final product.  This is a running list of things that need changing or clarification for the book "The Essential guide To Flash Games".  Even though we did everything possible to avoid these errors, we sincerely apologize for them.

Also, if you have anything to add, please put them in the comments below:

Chapter 1:

  • P 8 : the lines "A package is finite grouping of classes that are used for a similar
    purpose. The game framework itself will be package." should read: "A package is finite a grouping of classes that are used for a similar
    purpose. The game framework itself will be a package."
  • P. 20: there should be a semi-colon ";" at the end of the line "chancesLabel.text = "Misses:"
  • P. 41: "'away' should be 'enemy'": The code on page 41 says "break away".  It should read "break enemy"
  • P 41: The text reads "break out of the nested loop and get me the next item from the main loop".  In this specific case, the execution break both loops.   The text should read: "break out of the nested loop and get and resume execution after the main
    loop
    "
  • P 41: To fix the problem stated above and make the code break out of only one loop, the following code should be used:

enemy: for (var i:int=enemies.length-1;i>=0;i ) {
tempEnemy = enemies[i];
missile: for (var j:int=missiles.length-1;j>=0;j ) {
tempMissile = missiles[j];
if (tempEnemy.hitTestObject(tempMissile)) {
score++;
scoreText.text = score.toString();
makeExplosion(tempEnemy.x, tempEnemy.y);
removeEnemy(i);
removeMissile(j);

break missile;
}
}

}

  • No Flex SDK in ch. 1 : There was no code in chapter 1 for the Flex SDK.  This was by design, but some people have asked for it.  This is a link to a set of code and a short explanation for the ch. 1 games written specifically for the Flex SDK.  Get it here:http://www.8bitrocket.com/newsdisplay.aspx?newspage=38671

Chapter 2

Page 87

content.autoSize should content.autoSize=true;
label.autoSize should be label.autoSize=true;

Chapter 4 & 5:

  • P. 174: SoundManager missing: If you are copying the code directly from the book, you will need to change the constructor in GameFrameWork.as to the following:

public function GameFrameWork() {
soundManager = new SoundManager();

}

This issue does not exist in the code downloaded from the FoED web site.  We are working with FoED to update this in all future copies of the book, and to alert previous buyers of the change.

  • Flack instead of Flak:  If you see any instances of the word "Flack", they are supposed to be read "Flak".  Please note any you find in the comments below
  • No crosshairs.gif: There is no crosshairs.gif file in any of the code put up for download (although this should be fixed soon).  Here is the image you need:
  • Crash!: The Game Crashes in Flash Player 10.1 RC1 or before:  This was an Adobe created bug in Flash Player 10.1 RC1.  They have fixed it in RC2.  You can get the details here.

Chapter 5:

  • ScoreBoard Flashing: The ScoreBoard flashes in the background in the games in Chapter 5.  This not really Errata, but it is a bit annoying and can be easily fixed.

You can take-out the code in Main() that adds scorboard init():

//addChild(scoreBoard);

Then change the that creates
levelInScreen so that it is 20 pixels shorter than the screen size (580)
and add a line of code to makes sure levelInScreen appears below the
scoreboard (so it does not "flash" when levelInScreen is displayed)

levelInScreen = new
BasicScreen(FrameWorkStates.STATE_SYSTEM_GAME_OVER, 580,400, false,
0x000000);

levelInScreen.y = 20;

and add it later
by overriding a function like this:

override public function
systemNewGame():void {
addChild(scoreBoard);

super.systemNewGame();
}

Chapter 10:

Chapter 12:

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.
Comments (1) Trackbacks (0)
  1. what a wonderful book it is. I know i am late for saying this yet i feel that i owe a gratitude towards the twin brothers, considering i just got my hands on the book. I believe if all the computer programming books are written this way, then we shall have a bunch of brilliant game programmers everywhere. The thing i liked the most about this is the “proper way” of doing things. I know no books on the Internet (including the previous version) that take care of delivering solid content. Excellent


Leave a comment

No trackbacks yet.

This site is protected by Comment SPAM Wiper.