Can anyone help me with this
I got this from flashkit.com-password protection.
It was created in Flash 5. but when i opened it in MX, flash display an output :
Scene=Scene 1, Layer=Layer 1, Frame=1: Line 33: Left side of assignment operator must be variable or property.
eval(people.attributes.TITLE) = people.attributes.NAME;
Scene=Scene 1, Layer=Layer 1, Frame=1: Line 34: Left side of assignment operator must be variable or property.
eval(people.attributes.PASSTITLE) = people.attributes.PASSWORD;
Scene=Scene 1, Layer=Layer 1, Frame=1: Line 36: Left side of assignment operator must be variable or property.
eval(people.attributes.NUM) = people.attributes.VALUE;
i dont know about XML, so i can’t figure out whats the problem and whats the output is all about.
[AS]
// AS in the first frame
// LOADS XML VARIABLES
var varsXML = new XML();
varsXML.onLoad = loadVars;
varsXML.load(“test.xml”);
// HERE ARE THE FUN LOVING FUNCTIONS!!!
// THIS ONE CHECKS TO SO IF THE USER HAS ENTERED.
// A VALID NAME AND PASSWORD.
function verify() {
goodname = 0;
goodpassword = 0;
for (i=0; i<=accounts.length; i++) {
j = 1;
for (name in accounts*) {
if (this[‘input’+j] == accounts*[name]) {
this[‘good’+name] = 1;
}
j++;
}
if (goodname == 1 && goodpassword == 1) {
gotoAndStop(3);
} else {
gotoAndStop(2);
}
}
}
// THIS ONCE PARSES THE XML INTO USABLE VARIABLES.
// THANKS TO VAGABOND FOR PROVIDING THE FRAME WORK FOR THIS ONE.
function loadVars(success) {
if (success) {
var people = varsXML.firstChild.firstChild;
i = 1;
while (people != null) {
eval(people.attributes.TITLE) = people.attributes.NAME;
eval(people.attributes.PASSTITLE) = people.attributes.PASSWORD;
if (people.attributes.NUM eq ‘accountnum’) {
eval(people.attributes.NUM) = people.attributes.VALUE;
}
people = people.nextSibling;
}
} else {
trace(“errorLoadingXML”);
}
setObj();
}
// TAKES ALL THE LOADED VARIALBES AND TURNS THEM.
// INTO OBJECTS FOR THE VERIFY FUNCTION.
function setObj() {
accounts = new Array();
for (i=0; i<accountnum; i++) {
accounts* = {name:this[‘name’+i], password:this[‘password’+i]};
}
}
// THIS ONE STOP’S
stop();
[/AS]