fireburner69
Programmer
Ok I have this probleme which I can not understand fully!
I have a FLash movie! and I create some var!
For example!
for(x=0;x<10;x++) {
duplicateMovieCLip(_root.button,"button"+x,x);
}
all is smooth!
Inside the button Movie Clip I have a field named "name".
I try to change the the text!
I used again to make it a loop like this
for(x=0;x<10;x++) {
"_root.button"+x+".name" = "Active";
}
So all the button will have the label active inside!
This is not possible!
an error comes up like this
"Left side of assignment operator must be variable or property.
"_root.button"+x+".name" = "Active";
"
So this is not possible!
And in the other hand!
I have this array!
_root.users
from 0 to 10
and when I trace one of the I use this method again!
for(x=0;x<10;x++) {
trace(_root.users.+x);
}
The answer to this is NaN
??? I do not understand what this is!
And whan i use "_root.users."+x
this comes up _root.users.0 to 9 !!
But I want the var not the name!!
what can I do?
I have a FLash movie! and I create some var!
For example!
for(x=0;x<10;x++) {
duplicateMovieCLip(_root.button,"button"+x,x);
}
all is smooth!
Inside the button Movie Clip I have a field named "name".
I try to change the the text!
I used again to make it a loop like this
for(x=0;x<10;x++) {
"_root.button"+x+".name" = "Active";
}
So all the button will have the label active inside!
This is not possible!
an error comes up like this
"Left side of assignment operator must be variable or property.
"_root.button"+x+".name" = "Active";
"
So this is not possible!
And in the other hand!
I have this array!
_root.users
from 0 to 10
and when I trace one of the I use this method again!
for(x=0;x<10;x++) {
trace(_root.users.+x);
}
The answer to this is NaN
??? I do not understand what this is!
And whan i use "_root.users."+x
this comes up _root.users.0 to 9 !!
But I want the var not the name!!
what can I do?