DATA TYPES


If you've made it through the preceding lessons, you've already been introduced to all of the data types. However, since you've never looked at all of them together, here's a quick review:

  • String. This data type represents a text value (such as a name or title) or a value placed within quotation marks (such as "hello" or "dog" ).

  • Number. Numbers represent any numerical value that does not appear within quotes. For example, 6 represents the numeric value as shown, while "6" (with quotes) represents a string value. Understanding the difference between the two is crucial when it comes to manipulating data, especially when using the addition operator (+, which you'll learn about in the section, "Operators"). For example, "6" + "2" equals a string value of "62," but 6 + 2 (no quotes) equals a value of 8.

  • Boolean. A Boolean value can have one of two states: usually true or false or 1 or 0.

  • Object. Objects serve as storage devices for any data type, including other objects. They also can contain properties and methods that allow you to control and use them for various tasks. To review the types of objects available and how to use them, see Lesson 4, Understanding and Using Objects.

In this lesson, we'll focus on data manipulation using strings and numbers.



Macromedia Flash MX ActionScripting Advanced. Training from the Source
Macromedia Flash MX ActionScripting: Advanced Training from the Source
ISBN: 0201770229
EAN: 2147483647
Year: 2002
Pages: 161

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