PDA

View Full Version : Help changing from text MC to a .jpg MC in Flash from XML!


cbs01
10-07-2003, 04:45 PM
I'm reading a book on XML in flash and it has some code that I'm trying to recreate.

It hasif(this.nodeType==1){
_root.["nodeMC"+nodeNum].titlefield = this.nodeName;
_root.["nodeMC"+nodeNum].nodeIcon.gotoAndStop(1);
}
else{
_root.["nodeMC"+nodeNum].titlefield = this.nodeValue;
_root.["nodeMC"+nodeNum].nodeIcon.gotoAndStop(2);
}


But, I want to check the nodeType and determine what MC to load into my template. If it's words then load the textMC. If it's .jpg then load the picMC.

I've done tutorials and played around myself, but I'm wondering if anyone could assist me in this or point me to an Intermediate or Advanced xml in flash tutorial.

cbs01
10-07-2003, 04:46 PM
Much appreciation in advance!

cbs

cbs01
10-09-2003, 11:48 AM
Is this making any sense?

Do i have to use some sort of swap function?

cbs