PDA

View Full Version : XML problem in flash, please help ;-)


christofer
08-18-2005, 01:59 PM
Hello,

I am having a problem with XML based portfolio.swf bascically in my containerMC only one picture/text gets pulled from the xml, I use the following script/xml can anyone help me with this issue,I am sorta new to actionscript and have been struggeling for weeks with this issue dying to get it on line ;-)


This is what i have on each button now:

on (release) {
gotoAndPlay(4);
_root.Load()
}

This is my actionscript code I use inside the fla:

myXML = new XML();
myXML.ignoreWhite = true;
myXML.load("myFile.xml");
_root.node = -1;
function Load(){
_root.node++
this.containerMC.loadMovie(_root.myXML.firstChild. childNodes[_root.node].firstChild);
this.dynamic_txtbx.text = _root.myXML.firstChild.childNodes[_root.node].attributes.name;

}

myXML.onLoad=function(){

load()

}


Any help would be very much appreciated :-D

Jiggie
08-19-2005, 03:00 AM
Hi!
try taking a look at my attached file here:
http://flashmove.com/forum/showthread.php?t=21281&highlight=xml
just download the file asdf.zip

christofer
08-25-2005, 07:28 PM
Hey thanks for your reply, but its not exactly what im loking for. I have 12 containter MC's, and in those mc's are thumbnails displayed. There are also 12 invisable buttons overlaying the same 12 mc's. When you click on one, a larger image appears, along with text that matches it. I have this now, but i want it running on xml instead of text files. BUt i cant seem to get the picture to match the text on all except for the first one in the xml file. Do you know where i can find out more about this or how to do this?