This content has been marked as final. Show 3 replies
that's a timing issue . your code below your onLoad() handler executes before your onLoad() handler is called and therefore before myLoadVars.valid is defined.
also, you're likely to cause problems using _root.username2 and having a myLoadVars.username2.
i've come to the same conclusions except that still doesn't work
nor explain how to write the code so that I can use the data loaded
from the loadVars object from anywhere within the script except from within
what username2 variable do you want to access? myLoadVars.username2 or myLoadVars.valid? both those references will work if used AFTER they're defined. ie, after your onLoad() handler executes.
whether you use that code inside or outside of your onLoad() handler is irrelevent: both will work. it's the timing that's important and causing you problems. (in addition, you may confused be confused about the two different username2 variables you defined in your first post.)