Chapter 23. Screen Updates

Conceptually speaking, all screen updates in ActionScript can be separated into two categories: those that occur at regular intervals (scheduled updates), and those that occur immediately following the execution of certain event listener functions (post-event updates). Regardless of the category, all screen updates are automated. In ActionScript there is no general, arbitrary means of requesting an immediate screen update. Instead, new visual content created programmatically or manually in the Flash authoring tool is rendered automatically by a scheduled or post-event update. This chapter investigates ActionScript’s two varieties of screen updates.

While most of this book focuses on pure ActionScript code rather than specific .swf authoring tools, the following discussion requires some basic knowledge of the Flash authoring tool’s timeline and timeline-scripting techniques. If you are unfamiliar with the Flash authoring tool, you should read Chapter 29 before continuing with this chapter.

Scheduled Screen Updates

In ActionScript, screen updates are inexorably linked to the Flash runtime’s animation capabilities. Even pure ActionScript applications created with Flex Builder 2 or the mxmlc command-line compiler are governed by the Flash runtime’s animation-centric screen-update system.

The Flash runtime’s screen-update system is designed to accommodate the Flash authoring tool’s model for creating scripted animated content. In the Flash authoring tool, animated ...

Get Essential ActionScript 3.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.