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)
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
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
Post a Comment