14.02.2014, 12:57
box1 must be defined outside any function otherwise the variable will only work within the range of said function.
Global variables are those which are defined outside any callback/function and are intended to be globally used among all the callbacks.
Local variables, are those defined within a function, they can't overlay global variables (but can overlay other local variables in other functions) and will get erased once the function has been processed.
EDIT: Ninja'd again, I hate this!
Global variables are those which are defined outside any callback/function and are intended to be globally used among all the callbacks.
Local variables, are those defined within a function, they can't overlay global variables (but can overlay other local variables in other functions) and will get erased once the function has been processed.
EDIT: Ninja'd again, I hate this!