hiya -

I'm trying to load some xml from within an object. a little confused
how to handle callbacks.

inside the class (constructor) i create an XML object, call its load func.

class WireMenu {
private var myXML:XML;

public function WireMenu(xmlPath){
        myXML = new XML();
        myXML.ignoreWhite = true;
        myXML.onLoad = this.drawMenu;
        myXML.load(xmlPath);

}


all good, but the function that gets called back (drawMenu) only gets
passed a boolean/sucess flag. how do i get at the loaded XML data?

the data also doesnt seem to be within the myXML object either...
that method is like this:

        function drawMenu(p1, p2) {
                _root.dbg.text = "drawing";
                trace("WireMenu.drawMenu()");
                trace(myXML.firstChild);        // null
                trace(p1);      // true: so we were able to load, but where did 
it go?
                trace(p2);      // null
        }

tx for any help!!

/dc
_______________________________________________
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

Reply via email to