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,
0×000000);

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:

0saves
This entry was posted in Essential Flash Games Book. Bookmark the permalink.
  • DBL

    Just to let you know, it appears that the sfxr site mentioned in the book (http://www.cyd.liu.se/~tompe573/hp/project_sfxr…) is no longer valid. I was, however, able to find the program here:
    http://code.google.com/p/sfxr/downloads/list . You're right; it is a wonderful resource. Thanks for sharing it!

  • 8bitrocket

    Thanks for the update!

  • Mitho

    In GameFrameWork.as there’s a compile error. I’ve tried compiling using the code from the book as well as the code downloaded from your site and i get the same error.nnpublic function okButtonClickListener(e:CustomEventButtonId):voidnn1046: Type was not found or was not a compile-time constant: CustomEventButtonId.nnThanks.

  • http://www.8bitrocket.com 8bitjeff

    Hmm that’s is odd.The GameFrameWork.as file needs to be in the same folder as the CustomEventButtonId class. You have not moved anything from the com.efg.framework package folder have you? Since all of those classes are in the same folder there is no need to import them into the GameFrameWork.as.

  • Robert Wildling

    HI, I am working through this book. At just finished chapter 2 – building the framework, and I’d like to mention 2 things in connection with the little sample game, the “Click 10x the screeen” game:

    1. changing the waitTime in Main.as doesn’t have any effect on anything at all. I tried this with the downloadable source, too, and the Level 1 screen just shows 1 second even if waitTime is set to 3000! Is this supposed to be like that? If yes, I quite obviousely misunderstood sth…

    2. The little game has a checkForEndGame function. For the sake of good programming that respective function should also have a stage.removeEventListener(MouseEvent, onMouseDown);

    Otherwise I am looking forward to the next secrets of game programming! Thanks for the book and its info!

    PS: Are there any chances for a 2nd edition? Because if, please tell me and I’ll send you my copy, where all the errors (code-wise and grammar-wise) are marked. And there are DOZENS of them… unfortunately….

  • http://www.8bitrocket.com 8bitjeff

    There is a chance for the 2nd edition, and don’t worry about sending your copy, I have one right here with most of what you have (probably) crossed out. Actually, we re-wrote the entire book during the review process so you essentially have edition 2, but as you can see that forced us to hurry and we need a version 3 to iron out some of the typos. I think that waitTime worked in edition 1, and is actually used in later chapters when we have intra-level transitions, but in that first chapter the functionality was removed.

  • Robert Wildling

    Thanks for your response! – I finally realized why waitTime doesn’t have any effect on the length of the level display (I am still in chapter 2): the GameFrameWork define waitTime by itself with 30. Taking it away from there makes waitTime work perfectly well.

    Another thing is that in BasicScreen -> okButton the OVER and OFF stati are hardcoded in the function call “okButton = new SimpleBlitButton(…,0×000000,0xff0000,…) instead of using the attributes offColor and OverColor. This is still the case in the downloadable files.

    Thought, I mention it here…

  • http://twitter.com/sberfield sberfield

    Working my way through the book. Am only on Chapter Two, but am learning a lot by typing in all the class code rather than just using the downloaded files. One thing, though, you really need someone to work through the book in this way looking for errors. there are several places where you refer to things which are not in the code. Example: Page 73 refers to using okNeeded — which is not defined as a part off the function. And the rest of that paragraph appears to be talking about code which calls the class, but which is not yet covered in the book.

    On page 79, you reference lines of code that account for a 2 pixel offset in text fields, but those lines of code are not in either the source listing or in the downloaded file.

    Liking the book so far, but you really need better proofreading.

    • http://www.8bitrocket.com 8bitjeff

      Yep, you are right. those were in revision one that was completely replaced before the final book was published. I apologize for these errors.

  • Anonymous

    I just finished chapter two of the book and and typed all of the code into Flash Develop. I thought I followed everything exactly. I went to Build the Project and that seemed to go fine. However, when I clicked on Test the Movie this is what I got under the output screen:

    Error #2032: Stream Error. URL: file://C:UsersAngelaDocumentssourceprojectsstubgameflexSDKbinframework_3.4.1.10084.swz
    Failed to load RSL framework_3.4.1.10084.swz
    Failing over to RSL framework_3.4.1.10084.swf
    Error #2032: Stream Error. URL: file://C:UsersAngelaDocumentssourceprojectsstubgameflexSDKbinframework_3.4.1.10084.swf

    Does this mean there is something wrong with my path or is it something else? Any help would be greatly appreciated.

    Thanks,
    Angela

  • Anonymous

    Hi,

    I just finished chapter two of the book and typed in all of the code. I tried to follow everything exactly as it was laid out in the book, but I must have done something wrong. When I was done with the code I went to Build the Project and that went fine. Then I clicked on Test Movie and I got this error message:

    Error #2032: Stream Error. URL: file://C:UsersAngelaDocumentssourceprojectsstubgameflexSDKbinframework_3.4.1.10084.swz
    Failed to load RSL framework_3.4.1.10084.swz
    Failing over to RSL framework_3.4.1.10084.swf
    Error #2032: Stream Error. URL: file://C:UsersAngelaDocumentssourceprojectsstubgameflexSDKbinframework_3.4.1.10084.swf

    Is there something wrong with my path or is it something else? I have no clue what is wrong and any help would be greatly appreciated.

    Thanks,
    Angela

  • Anonymous

    Hi,

    I just finished chapter 2 in the book and typed in all of the code into Flash Develop. I tried to follow everything exactly as it was laid out in the book. I was able to Build the Project successfully, but when I clicked on Test Movie I got this error message:

    Error #2032: Stream Error. URL: file://C:UsersAngelaDocumentssourceprojectsstubgameflexSDKbinframework_3.4.1.10084.swz
    Failed to load RSL framework_3.4.1.10084.swz
    Failing over to RSL framework_3.4.1.10084.swf

    I don’t know what is wrong. Is it the path? Something else? Any help would be appreciated, otherwise I’ll be stuck at this point forever and won’t be able to progress through the book. Thanks.
    Error #2032: Stream Error. URL: file://C:UsersAngelaDocumentssourceprojectsstubgameflexSDKbinframework_3.4.1.10084.swf

    • Anonymous

      I’ll get Jeff looking at this one today. Thanks for the heads-up.

  • http://twitter.com/theodeus theodeus

    I’m a bit confused by this statement at page 87:

    label.autoSize;

    and then no assignment? I guess it’s nothing that breaks the code, but it’d be nice to know what it was meant to be!

    • http://www.8bitrocket.com 8bitjeff

      I assume those both should have “=true;” appended.
      I know they are like that in the code. Steve and I have found some of the final PDF files were not printed correctly. This might be the case here. It doesn’t cause an error, but it doesn’t do anything. Change them to content.autoSize=true; and label.autoSize=true;

      • Anonymous

        Jeff, can you add that to the errata in the post.

      • Anonymous

        Jeff, can you add that to the errata in the post.

        • http://www.8bitrocket.com 8bitjeff

          done

  • Paul Croft

    Hi there,

    Just wanted to point out that the Shot class for the FlakCannon game is missing a value. In the update method it needs to have ‘moves–’. 

    Also in the following class (BonusShip) the variable distance is written with a capital D. But you have probably already picked up on these ones.

    Great book by the way! Am enjoying working through it!

    SubduedInsanity

    • Anonymous

      Paul, thanks.  Yeah, the conversion of the book from Word to .pdf created a lot of issues (lost lines, weird characters). We are very sorry. Thanks for pointing these out,  The code distribution should have working code.

  • Paul Croft

    Hi there,

    Just wanted to point out that the Shot class for the FlakCannon game is missing a value. In the update method it needs to have ‘moves–’. 

    Also in the following class (BonusShip) the variable distance is written with a capital D. But you have probably already picked up on these ones.

    Great book by the way! Am enjoying working through it!

    SubduedInsanity

  • http://twitter.com/SubduedInsanity Paul Croft

    Hi guys,

    I am currently trying to run Flak Cannon via the Flash IDE, but it seems that the BitmapData.hitTest is killing it, and I cant figure out why.

    Flash itself literally crashes out, I tried un-installing the flash player and reinstalling the latest version but its still crashing. 

    It doesn’t crash if I use the standard MovieClip.hitTest call though.

    I know that you said that Adobe had fixed it, do you think they may have broken it again, or could it be my implementation?

    Sorry about this!

    Great book otherwise!

    Paul

    • http://twitter.com/SubduedInsanity Paul Croft

      Just found out that if I add this function into the enemy/ship/bonusplane class, it seems to fix it.

      public function get bitmapData():BitmapData
      { imageBitmapData.draw(this);

      return imageBitmapData;
      }If I simply try to return the imageBitmapData, or image.bitmapData, it crashes out again.

      • Anonymous

        Nice job Paul!!
        How are you running the game?  It seems that the fix was made by Adobe in the browsers, but not stand-alone.  What are you seeing?

        • http://twitter.com/SubduedInsanity Paul Croft

          I am running this in Flash CS5, on a Snow leopard Mac. It lets me compile, and then play the game, but the minute it attempts to run a collision test on any object, it pauses for about 5 seconds, then Flash simply ‘quits unexpectedly’. No errors are given in the IDE before it does either.

          Is there anything else I can provide to hopefully get this fixed? 

          • Anonymous

            OK, so the stand-alone Mac Player has always been an issue here.  Have you tried the original code, running in the browser with the latest version of the Flash player?

            I might just change the source to your fix if you still can’t get it to run.   I like the way you did it.

          • http://twitter.com/SubduedInsanity Paul Croft

            Thanks! 

            Ah, you were right, I just tested it in the browser with the original code, and the latest player, and it works fine, seems its standalone issue here.Do you think they might release a standalone player ‘update’ to fix this or maybe its been fixed in CS5.5?Either way, onwards and upwards, onto no tanks now!

          • http://twitter.com/SubduedInsanity Paul Croft

            Thanks! 

            Ah, you were right, I just tested it in the browser with the original code, and the latest player, and it works fine, seems its standalone issue here.Do you think they might release a standalone player ‘update’ to fix this or maybe its been fixed in CS5.5?Either way, onwards and upwards, onto no tanks now!

  • http://www.web-hosting-service.in web hosting India

    I am not familiar with this information but today I had been gathered some new and different information from your post. Thank you for sharing this useful information.

  • Anonymous

    Hi,

    Love the tutes, the info throughout your site and the book!
    It’s all a great inspiration and help.

    I have a small niggle when using the StateManager, to be more precise when calling a New_LEVEL, maybe you can help?
    In Flak Cannnon I have noticed when a NEW_LEVEL is called, there is a split second where the new level displays immediately before the Level In screen – is there a way to stop this happening and to ‘force’ the Level In screen to absolutely show before the new level??

    Thanks

    • Anonymous

      I have a fix for this.  Let me dig it up and I’ll get back to you here.

  • Alexandre Colella

    Hi all! I’m having trouble in the stub game! The Main.as class is not found.
    I didn’t receive an error, just a blank screen.
    When I click on the Edit Class definition button, a new Main.as is opened to me. The Main.as that I coded is not showed.
    I did all the steps correctly! :)  
    This is the class definition: com.efg.games.stubgame.Main
    The game FLA is on FlashIDE path and after FlashIDE I have comefggamesstubgame
    What is wrong? Thanks!

    • Anonymous

      Are using the Flash IDE or FlashDevelop?

  • Matt Casey

    Hi I am having trouble with the stub game. Everything works apart from the game over screen. When I get to ten mouse clicks nothing happens and it just keeps counting.

    I tried replacing the runGame() function in StubGame.as with a trace to see what was happening and it doesnt appear so it looks like the runGame() override is not working.

    thats as far as I can get so any advice would be much appreciated.

  • Matt Casey

    repost in error pls delete

  • http://www.joomla-web-developer.com joomla developers

    Thanks for the guide on   Flash Games Errata F.A.Q

  • http://www.joomla-web-developer.com joomla developers

    Thanks for the guide on   Flash Games Errata F.A.Q