# XML problems

**URL:** <https://forum.kirupa.com/t/xml-problems/28842>\
**Category:** flash\
**Created:** [August 19, 2003, 6:57am UTC](https://forum.kirupa.com/t/xml-problems/28842 "2003-08-19T06:57:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neo\_Geo](https://avatars.discourse-cdn.com/v4/letter/n/d2c977/32.png) [@Neo\_Geo](https://forum.kirupa.com/u/Neo_Geo)\
**Post date:** [August 19, 2003, 6:57am UTC](https://forum.kirupa.com/t/xml-problems/28842/1 "2003-08-19T06:57:28Z")

</div>

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 :

```auto

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]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 19, 2003, 7:30am UTC](https://forum.kirupa.com/t/xml-problems/28842/2 "2003-08-19T07:30:15Z")

</div>

you can’t do this:  
eval(people.attributes.NUM) = people.attributes.VALUE;

what are you trying to do exactly?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 19, 2003, 7:40am UTC](https://forum.kirupa.com/t/xml-problems/28842/3 "2003-08-19T07:40:44Z")

</div>

this is for password.  
when the user type their password, flash confirm it from XML file in the same folder. (This is what it stated in the file that i downloaded)

do you need to look at the fla?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 19, 2003, 7:46am UTC](https://forum.kirupa.com/t/xml-problems/28842/4 "2003-08-19T07:46:08Z")

</div>

oh no, i meant, why are you using eval in there?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 19, 2003, 7:51am UTC](https://forum.kirupa.com/t/xml-problems/28842/5 "2003-08-19T07:51:03Z")

</div>

I don’t have any idea. This is what i download. I don’t know about XML nor eval.  
It works fine in flash 5 but not when i opened it in MX

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 19, 2003, 8:05am UTC](https://forum.kirupa.com/t/xml-problems/28842/6 "2003-08-19T08:05:19Z")

</div>

the files
