Chapter 03
More ActionScript:
Data-Driven Interfaces
Goals

This chapter completes our brisk survey of advanced ActionScripting. We will fulfill the goals we developed in the last chapter, focusing on data driven solutions- design and logic that respond to internal data. Among other logic, this approach includes the dynamic creation and destruction of graphic elements. We are building up this reliance on internal data, so that, after we learn XML, we will easily be able to switch our client to running off XML.

Throughout this book we concentrate on Flash as thin flexible clients. A thin client runs off data that comes from elsewhere, it focuses on the graphic and interactive function, where Flash shines. A flexible client can take a wide variety of inputs, requiring the client to adapt to what it is told, not requiring careful input. Technically, there are wins in system maintenance and upgrades, multiplatform support, version control and download time. But our primary interest in a thin client is to more clearly expose the data inside. Our aim is thin, pliant Flash that wraps itself around a fairly visible XML skeleton.

This chapter is less involved with the rules of ActionScript language, and more dedicated to the practical problems of building smart graphics. It demonstrates a useful approach to the problem, and hopefully stimulates readers to invent others..

Data Driven Decisions

So far we have applied labels to buttons, which is nice. The buttons click nicely, too. But nothing happens. This puts our game at a distinct disadvantage to other games in which actual activity occurs.