Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In many cases in ActionScript development, a value needs to be used in a way that its data type will not permit. For example, numbers that are typed into an input field are recognized as strings. To perform math with a number that is considered a String, you have to retype it, or convert it to a Number.
In ActionScript there are String and Number classes, which allow you to work with strings and numbers. These classes have a few built-in methods for recasting and converting data types. String() and toString() are methods of the Number class. Number() is a method of the String class.