Sure: I am trying to retreive kp_array in 'classB', which is in the kpLoad function.
/** * ... * @author - * @version 0.1 */ import mx.utils.Delegate; class xmlHandler { public var new_array : Array; public var numKPs : Number; public var kpID_array :Array public var kp_array :Array private var kp_xml : XML; private var numGlossIDs : Number; public var numGlossTerms : Number; private var letters_array : Array; private var glIndex_array : Array; private var glTerms_array : Array; public var glDefs_array : Array; private var tmpArr1 : Array; private var tmpArr2 : Array; private var glButtActive : Array; private var gl_xml : XML; private var numRefs : Number; private var ref_xml : XML; public var refID_array : Array; private var refRef_array : Array; private var i : Number; private var j : Number; private var __index : Number; var kp_cmp:mx.controls.TextArea; public function xmlHandler(){ //Keypoints kpID_array = new Array; kp_array = new Array; kp_xml = new XML (); kp_xml.ignoreWhite = true; //Glossary letters_array = new Array; glIndex_array = new Array; glTerms_array = new Array; glDefs_array = new Array; glButtActive = new Array; tmpArr1 = new Array; tmpArr2 = new Array; gl_xml = new XML (); gl_xml.ignoreWhite = true; //References refID_array = new Array; refRef_array = new Array; ref_xml = new XML (); ref_xml.ignoreWhite = true; //Load keypoints kp_xml.load ("xml/keypoints.xml"); kp_xml.onLoad = Delegate.create (this, kpLoad); } //// //// public function kpLoad (bSuccess : Boolean) { if (bSuccess){ //trace("Keypoints loaded!"); //++++Sort keypoints numKPs = kp_xml.firstChild.childNodes.length; for (i = 0; i < numKPs; i ++){ kpID_array.push (kp_xml.firstChild.childNodes[i].attributes.id); kp_array.push (kp_xml.firstChild.childNodes[i].childNodes[0].nodeValue); } //++++ //trace(kp_array); gl_xml.load ("xml/glossary.xml"); gl_xml.onLoad = Delegate.create (this, glossLoad); } else { _root.debug_txt.text = "Keypoints XML failed to load"; } } //// //// public function glossLoad (bSuccess : Boolean) { if (bSuccess){ //trace("Glossary loaded!"); //++++Sort glossary numGlossIDs = gl_xml.firstChild.childNodes.length; for (i = 0; i < numGlossIDs; i ++) { numGlossTerms = gl_xml.firstChild.childNodes [i].childNodes.length; glIndex_array.push (gl_xml.firstChild.childNodes [i].attributes.letter); if (numGlossTerms == 0) { glButtActive.push(0); } else { glButtActive.push(1); var tmpArr1:Array = new Array(); var tmpArr2:Array = new Array(); for (j = 0; j < numGlossTerms; j ++) { tmpArr1.push (gl_xml.firstChild.childNodes [i].childNodes [j].childNodes [0].childNodes [0].nodeValue); tmpArr2.push (gl_xml.firstChild.childNodes [i].childNodes [j].childNodes [1].childNodes [0].nodeValue); } glTerms_array.push (tmpArr1); glDefs_array.push (tmpArr2); } } //++++ ref_xml.load ("xml/references.xml"); ref_xml.onLoad = Delegate.create (this, refsLoad); } else { _root.debug_txt.text = "Keypoints XML failed to load"; } } //// //// public function refsLoad (bSuccess : Boolean) { if (bSuccess){ //++++Sort keypoints numRefs = ref_xml.firstChild.childNodes.length; for (i = 0; i < numRefs; i ++){ refID_array.push (ref_xml.firstChild.childNodes[i].attributes.id); refRef_array.push (ref_xml.firstChild.childNodes[i].childNodes[0].nodeValue); } //++++ } else { _root.debug_txt.text = "Keypoints XML failed to load"; } _root.id_txt.text = refRef_array; } } _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com