To declare the data type of a variable, use the colon operator right after the name of the variable. : Variable Declare « Data Type « Flash / Flex / ActionScript
To declare the data type of a variable, use the colon operator right after the name of the variable.
package{
import flash.display.Sprite;
publicclass Main extends Sprite{
public function Main(){
var x:Number;
var name:String = "Mims";
x = 42; // No problem
x = -13; // No problem
x = 3.141; // No problem
}
}
}