Practical Flash


In this chapter, we do not attempt to conscientiously teach Flash graphics creation. That is the subject of many other books. The chapter is not even an overview of the subject. In fact this chapter is more of an underview. We offer a mouse's-eye view of the construction of a few simple but sophisticated interface elements. We don't suggest that our methods are the best approach to each problem. Multifaceted software like Flash invites creative approaches. The approach we show here, based on much experience in team production of code and graphics, is one good approach. Consider it as you develop your own.

Project Design

The trivia quiz game that we will build throughout this book is complex and sophisticated. It starts, however, with some simple ideas that are recognizable in every later step of development.

Before we start any code, even demonstration code, we need to think a little about the design. In general, a detailed planning phase is always a good investment. But in this case, just a simple layout of hierarchy will suffice.

We organize a Game into a series of Quizzes (Figure 1.1). Each Quiz has several rounds. A Round is the presentation of a Question, the player's response, and the scoring. The Question is presented in Q&A format: a single Q and multiple-choice A 's.

Figure 1.1. Object Hierarchy of the Trivia Game

graphics/01fig01.jpg

In this chapter we create a single functional Round. We present a Question and a series of Answer options and determine whether the player has chosen the correct one. That's all for now.

Our approach is to develop three states : Start state, Win state, and Lose state (Figure 1.2). The latter two states comprise the Response to the user . The Start state encapsulates the Question presentation.

Figure 1.2. Logic at One Round

graphics/01fig02.jpg



Flash and XML[c] A Developer[ap]s Guide
Flash and XML[c] A Developer[ap]s Guide
ISBN: 201729202
EAN: N/A
Year: 2005
Pages: 160

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net