XML Not Loading


should simple. code works "success" part of xml load. failure. no explanation. able make simlple file load xml - not code. know simple. missing semicolon?

function loadxml(success) {
trace("in load module");
if (success) {
trace("load positive");
xmlnode = this.firstchild;
image = [];
thumb = [];
description = [];
total = xmlnode.childnodes.length;
(i=0; i< total; i++) {
image = xmlnode.childnodes.childnodes[0].firstchild.nodevalue;
thumb = xmlnode.childnodes.childnodes[1].firstchild.nodevalue;
description = xmlnode.childnodes.childnodes[2].firstchild.nodevalue;
thumbclip = "mc_" + i;
_root.gallery.thumbclip = thumb ;
trace(thumb
+"going "+thumbclip);
}
firstimage();
} else {
trace("file not loaded!");
}
}
function getgallery(what){
trace(what+" in getgallery");
myxml.onload = loadxml();
myxml.load(what)

there handy thing in flash can use check see if script valid. looks little check mark

this gave me:

**error** scene=scene 1, layer=actions, frame=2:line 23: statement block must terminated '}'
function getgallery(what){

aka - missing ';' @ end , '}' funciton on line 23.

**error** scene=scene 1, layer=actions, frame=2:line 27: syntax error.

total actionscript errors: 2 reported errors: 2


More discussions in ActionScript 1 and 2


adobe

Comments

Popular posts from this blog

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

How to format a Get Request

avrdude: verification error, first mismatch at byte 0x0000 0x0c != 0x62