flash: why use "var"?
flash: why use "var"?
Out of context: Reply #13
- Started
- Last post
- 13 Responses
- tjk_work0
In addition, var will save you if you for some reason use a predefined piece of actionscript syntax as a variable name.
i.e.
loadMovie = something
this will cause an error because actionscript thinks your calling a loadMovie action.
var loadMovie will work because you have specified that your using the name as a variable.
I do not advise using actionscript syntax as variable names though (it becomes quite confusing). But its always good practice to put var in front of a variable when declaring it.