Hello Ken,

As you don't LOAD anything, menu_xml.getBytesTotal() will return
undefined - it's OK.
You can either set interval or onEnterFrame function to check the ned
of parsing and then delete/clear onEnterFrame/interval.

Also, check spelling of mymenuxml (quotes, ";" etc)

Also, I'd suggest to use just:
//======= code ========
mymenuxml = "your xml string";
menu_xml = new XML(mymenuxml);
menu_xml.ignoreWhite = true;
  

-- 
Best regards,
 GregoryN                        
================================
http://GOusable.com
Flash components development.
Usability services.


>-------"Ken Fine" wrote:
> I'm attempting to manually load an XML object via a string. I appear to be
> successfully completing this process: my XML is well-formed, and
> myxmlobject.toString() returns a result, as do attempts to traverse the
> attributes and nodes. 
> 
>  
> 
> What isn't working is the XML object itself when I attempt to use it to
> build a kirupa.com-style XML menu, or when I attempt to run the
> .getBytesTotal() method on the object. My menuing and code works just fine
> when I load the same XML from an external file and set up an onLoad event,
> but it breaks when I use the XML as a string and attempt parseXml. The code
> copied below returns "undefined" on the trace. 
> 
>  
> 
> What I think I may be running into is Flash attempting to use the object
> before it is parsed and loaded into memory, and I need the equivalent of
> "onParseComplete". Or maybe it's something else. Can anyone help on this
> puzzling problem?  
> 
>  
> 
> Thanks in advance for any assistance you can offer. 
> 
>  
> 
> menu_xml = new XML();
> 
> menu_xml.ignoreWhite = true;
> 
> mymenuxml = ("<?xml version=\"1.0\"?> <menu name=\"links\">
>// ... truncrated
> </menu>")
> 
> menu_xml.parseXML (mymenuxml); 
> 
> myxmlsize = menu_xml.getBytesTotal();
> 
> trace ("myXMLSize"+ myxmlsize);
> 
>  
> 
> [code above returns "undefined"]


_______________________________________________
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