I’m trying to pass an xml node from one class to another and still be able to access that node’s properties with no luck.
I’ll get right into the code for everyone though:
inside 1.as I have:
var xmlNode = this.xmlData.firstChild.childNodes[1];
var passThese:Object = new Object;
passThese.passNode = xmlNode;
this.attachMovie('classClip2','otherClass',1,passThese);
trace(xmlNode.childNodes[1].firstChild.nodeValue);//this works! and spits out specific entry.
trace(passThese.passNode)//this works! and spits out entire node
trace(passThese.childNodes[1].firstChild.nodeValue);//this doesn't work.
inside 2.as I have
var passNode:XMLNode;
...
trace(passNode);//this works! and spits out entire node
trace(passNode.childNodes[1].firstChild.nodeValue)//this doesn't work! spits out undefined
So it seems like after I put the xmlNode into an object it no longer becomes “searchable” or whatever.
Any thoughts?