Learning ActionScript 2.0 in Adobe Flash |
|
|
|
| Classes > About object-oriented programming and Flash > About values and data types | |||
Data, values, and types are important when you start writing classes and using them. You learned about data and types in Data and Data Types. When you work with classes, remember that data types describe the kind of information a variable or ActionScript element can contain, such as Boolean, Number, and String. For more information, see About data types.
Expressions have values, while values and properties have types. The values that you can set and get to and from a property in your class must be compatible with that property. Type compatibility means the type of a value is compatible with the type that is in use, such as the following example:
var myNum:Number = 10;
For more information on strict data typing, see About assigning data types and strict data typing.
|
|
|
|