-
ok thanks for all your help
i have the global variables being made from the variables called! and its passing them throught the flash file.
sorry to be such a NOOB, but im havin trouble with my for loop to rename all the global variables
"
for(i=0,i<100,i++){
_global.myvar(i)=myLoadVars.myvar(i);
}
"
im gettin errors
-
Code:
for(i=0,i<100,i++){
myVar+i = myLoadVars.myvar+i;
}
this makes each var like this
var0
var1
var2
var3
This would push 100 myvars into an array.
Code:
array0 = new Array ();
array0[0] = defaultVar;
for(i=0,i<100,i++){
array0.push (myVar+i = myLoadVars.myvar+i);
}
you might have to tweak the array code though because I didn't test it but thats how to go about it.
-
**Error** Scene=Scene 1, layer=Layer 3, frame=2:Line 11: ';' expected
for(i=0,i<100,i++){
**Error** Scene=Scene 1, layer=Layer 3, frame=2:Line 12: ';' expected
_global.myvar+i = myLoadVars.myvar+i;
**Error** Scene=Scene 1, layer=Layer 3, frame=2:Line 13: Unexpected '}' encountered
};
-
oh sorry
for(i=0;i<100;i++){
-
getting closer...
"
**Error** Scene=Scene 1, layer=Layer 3, frame=2:Line 5: Left side of assignment operator must be variable or property.
map_location+i = myLoadVars.map_location+i;
"
-
change map_location+i to a freaking variable
Code:
var loc = map_location+i;
loc = myLoadVars.map_location+i;
there is a better way to write it than that but I don't remember how.something like
Code:
this[map_location+i]=myLoadVars.map_location+i;
-
this is correct....use it. change this to _root or _level whichever you need.
this[map_location+i]=myLoadVars.map_location+i;