
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
63
Chapter 3
CHAPTER 3
Data and Datatypes
Having worked with variable values in Chapter 2, you’ve already had a casual intro-
duction to data, the information we manipulate in our scripts. In this chapter, we’ll
explore data in more depth, learning how ActionScript defines, categorizes, and
stores data. We’ll also explore how to create and classify data.
Data Versus Information
In the broadest sense, data is anything that can be stored by a computer, from words
and numbers to images, video, and sound. All computer data is stored as a sequence
of 1s and 0s, which you might recognize from high-tech marketing materials:
010101010101010110101011011010101010101010000010101010101011010101010
101010101010101011101010101010101010101010101010111110101010101010101
010101010101010101010101011101010101010101010101010101010101010101010
Data is information in its crude state—raw and meaningless. Semantics give informa-
tion meaning. Consider, for example, the number 8008898969. As raw data it isn’t
very meaningful, but when we classify it semantically as the telephone number (800)
889-8969, the data becomes useful information.
This chapter shows how to add meaning to raw computer data so that it becomes
human-comprehensible information.
Retaining Meaning with Datatypes
How do we store information as raw ...