In FFish Scripting language, you can define global variables and local variables. The global variable is declared without the keyword "var".
// decares a local variable var obj = new Object; // declares a global variable arr = [1, 2, "string"];
After a FFish Script has finished running, all local variables declared inside a block will be cleared, as well as the interim variables. That is to say, they are not accessible in the followed scripts.
The global variables, local variables that are not inside any blocks and named function can be accessible in the later scripts.
To access a function defined in another script, you must load the script contains the function into memory firstly. It can be done by the "invoke" method.