—Benjamin Franklin

—Benjamin Franklin

Good planning is an important part of a successful Action- Script project. Further, good planning is important for any successful Flash project. One measure of success is the quality of the final product. But success can also be measured by the ease of the process that led to the final product. Was the project a last-minute scramble? Could the stress of the project have been lessened? Changes happen in all projects, so it is the savvy Flash user who builds flex- ibility into a project.

You can’t plan for every possible scenario. So, part of the planning process is to determine which aspects of the proj- ect are likely to change. If you’re planning a character’s walk cycle, one predictable change will be the character’s position in space. Therefore, it makes sense to have all the appendages and moving parts of the character nested into one symbol so the entire character can be moved to

Animation with Scripting for Adobe Flash Professional CS5 Studio Techniques

simulate walking. If you animated your character’s mov- ing parts on the main Timeline and then realized that you needed to move everything into a symbol, it could be a bit of a headache trying to copy everything and move it into a new symbol.

Here are some factors to consider before even opening Flash:

. What does the movie need to achieve? Will it require

user interaction? . What are the likely output formats? Web? Broadcast?

Mobile? How will these affect the color palette? . Is file size an issue? . For larger projects, can the project be broken into

smaller, more manageable pieces? . Is this project likely to require future updates? What’s

feasible to build now versus over the lifetime of the project?

. What can be reused from this project for future

projects? . What can be reused from past projects for this project? If you spend the proper time and energy during the plan-

ning stage of a project, the beginning of your project will

be the slowest part. Ideally, after this initially slow start to your project, your work will get progressively smoother as you approach the end of the project, because you have thought through likely changes and problem areas, and planned accordingly.

The planning process also helps to reveal any areas of the project that require more attention. These are areas where you may not be sure if such a task is even possible in Flash or if it is possible to implement without someone else’s assistance. Once you have identified these areas, you can build specific tests.

Consider this situation: Suppose a client has asked you to design a simple Flash application that includes an accu- rate stopwatch. You’ve never built a stopwatch before, but it’s a relatively small part of the application and you feel quite comfortable with everything else that the client has

Chapter 3 Introduction to ActionScript Classes

requested of you. Rather than building everything else first and waiting until the night before the project is due (when you may find out you need to contact a more experienced Flash developer for help), try building a prototype of the stopwatch before you start any other part of the project. If you find that you need help, you’ll have plenty of time to locate a resource. If you find that the stopwatch is no problem for you to build, you can proceed with confidence knowing that the hardest part of your project is done. Also, since you built the stopwatch independently from the rest of your project, it will likely be easier to apply to future projects, because it doesn’t rely on anything specific about the current project to function.

The more independent the working parts of your Flash project are, the more they are considered to be modular. Modularity allows the parts of your movie to be easily reused and recombined to serve different purposes. Modu- lar design is the first step toward reusability. When deciding which pieces of your project should be modular, you will have to weigh the costs and benefits. Modular parts gener- ally take a little longer to develop. However, when you need to make a change to a part of your project that you’ve built to be flexible, the change will be so painless that the extra initial development time will have been well worth it.

A solid building requires a solid foundation. The planning process described in this section is about designing the foundation for your Flash project, even when what will go on top of that foundation is somewhat uncertain. Consider this scenario: You’re laying the foundation for a house, and you don’t know if the room on the east side will be a study or a garage, but you have a deadline nonetheless. To move forward with your task, you wire the room so that it could become a study or a garage. In your Flash project, it will be up to you to decide which components need to be flex- ible. Think about how these choices will affect the project’s foundation and what can potentially be built on top of that foundation.

Now, on to the nuts and bolts! Let’s starting talking about ActionScript.

Animation with Scripting for Adobe Flash Professional CS5 Studio Techniques