chapter  9
Keep it modular
Pages 12

Flash can provide you with the programming tools to make your code well structured. Unfortunately, this flexibility can also be used to create very poorly structured code. Game development can be made very hard or very easy. Careful planning and good structure makes development so much easier. In this chapter we look at how to take an idea for a game, turn it into a well-planned project and then develop the code. We will look at using custom functions to make sure that you only have to change your code in one place to have a global effect. We look at using functions to change the value of certain variables. We look at the difference between local and global variables. But most importantly we will look at how to embed complexity into your Movie Clips so that they can look after themselves and better still you will have code that you can reuse.