Using the Essential Flash Games Framework Hint #1: The mochi package

We have a had a few emails from people who are having some trouble publishing the games from the framework. One of these was an actual problem and it was fixed with a new code update yesterday.  While the text in the book is correct, the files on the download site were wrong. 

Most of the other problems have been confusion over what parts the framework are necessary for the games. The short answer is THE ENTIRE FRAMEWORK is necessary even for games that don’t need some of the classes. This doesn’t mean that you will compile the entire framework into each game, but the classes in the
folders are needed for all of the games to compile.

This is necessary even though only the final game in chapter 12 uses Mochi.  The reason being that  even though the framework is built upon and iterated through the 12 chapters, we only delivered the final full version of the com.efg.framework package with the book source code. 

The file imports the mochi.as3.* package in this final version. If you plan to just compile the source and not work through the chapters (a very likely scenario), you must make sure not  to omit importing any of the classes used in this file or delete the packages from the source folder. Both the IDE and FlashDevelop delivered project and source files already have class paths set for these to work properly. You do not need to do ANYTHING for them to work correctly. Just don’t delete classes even if you think you will not need them.

The Mochi classes add a little overhead to the framework, but not enough for you to need to delete the references to them if you are not going to use them.  

Leave a Reply