Lethian
05-27-2005, 01:59 PM
Hi,
When variables are loaded with a loadVar object, are they recognized without using the object name to access them ?
I would have thought that they don't but regarding the results I got with the following code, I don't understand how loadVar object works :
var version=1;
trace(_level0.version); //i get 1
loader=new LoadVars();
loader.load("http://www.mysite.com/mypage.php");
/*this php page returns some variables among which is a variable named version with the value 2*/
trace(_level0.version); // I get 2
trace(_level0.loader.version); // I get 2
thanks
When variables are loaded with a loadVar object, are they recognized without using the object name to access them ?
I would have thought that they don't but regarding the results I got with the following code, I don't understand how loadVar object works :
var version=1;
trace(_level0.version); //i get 1
loader=new LoadVars();
loader.load("http://www.mysite.com/mypage.php");
/*this php page returns some variables among which is a variable named version with the value 2*/
trace(_level0.version); // I get 2
trace(_level0.loader.version); // I get 2
thanks