Variables, values, and data types
//Variables, values, and data types
//A variable is a container that holds data!
//A variable is an identifier/name associated with a value
//To declare and initialize a variable, use the var keyword
//to name the variable and the = operator to assign it a value
//var someName = someValue;
//adding a colon(:) after the variable name allows you to assign
//the data type of the variable, known as data-typing
// var someName:DataType = someValue;
//Three common simple data types are Numbers, Strings, Booleans
//Numbers
var myAge:Number;
myAge = 21;
trace (myAge);
myAge = 18;
trace (myAge);
//Strings
var myName = "Karl";
var myGreeting:String = "Hello everyone learning Flash!";
trace (myGreeting);
//Booleans -- A boolean is either true or false
var isEnrolled = true;
trace (isEnrolled);
var isHungry:Boolean = true;
isHungry = false;
//A MovieClip is a complex data type
var myClip_mc:MovieClip = new MovieClip();
trace (myClip_mc);