Quick Example
Create a new flash document and on frame 1 open the actions (F9 if not visable) panel and type:
var who:String = "Gavin"; var age:Number = 20; trace (who+" "+age);
Control / Test Movie, notice in the output window Gavin 20 is displayed. The + " "+ puts a space between the two variables.
Quick Example
Create another Flash document and on frame 1 open the actions panel and type:
var numbOne:uint = 5;
var numbTwo:uint = 10;
var totalNumb:uint = numbOne+numbTwo;
trace(totalNumb);
You create variables with a datatype of uint containing a positive integer. Then create another variable and this stores the valaue of the previous two variables combined. The trace will display the value in the output window. This is very useful for debugging code and when exported as a swf the user will not see it.
Note: Try changing the datatype of totalNumb to totalNumb:String and test the movie. Notice the error message this will occur if there is conflict between datatypes assigned to variables.
