Every single programming language in the world makes use of variables to store and retrieve data to and from the memory of the computer. JavaScript and ActionScript are no exception! In Captivate, it is enough to know that a variable is a named space in the memory of the computer in which data can be read or written.
To cut a long story short, a variable is made up of two things:
- A name: This name must comply with strict naming rules and conventions. In ActionScript, for instance, the name of a variable cannot contain any spaces or special characters (such as @, é, è, ç, à , #, ?, /, and so on). When writing a script, the programmer uses the name of the variable to access the data it contains.
- A value: The value is the piece of data that the variable contains. This value can change (vary) during the execution of the script or each time the script is executed, hence the name variable.
For example, v_firstName = "Damien" defines a...