Is it possible to retain variable information after exiting an onLoad event?
I have a variable declared outside the onLoad event which a function called from within the onLoad event populates. The problem is, after leaving the onLoad event the variable gets cleared. Any solutions?
what kind of variable? Loaded variables? They still exist after the onLoad event defined within the loadVars or XML object. Local variables, however will not (variables defined with var within the onLoad function block). For those, you can instead declare them outside the function in the scope of the script. That way they’ll be accessible from anywhere within the script. i.e.
var myvar;
my_lv.onLoad = function(){
myvar = this.loadedvar;
}