No offense Scott, but you are asking some really basic questions about how AS works and how the XML object in Flash works and this may not be the list to be asking. I guarantee you are going to get some harsh replies on this list for basic questions. Spend some time in the help files (f1) you will be glad you did.
I would suggest you go look at some basic tutorials on xml in Flash. www.actionscript.org www.flashkit.com www.actionscript.com www.communitymx.com/ google groups There is also a flash newbie list: http://www.figleaf.com/Community/listserv.cfm Because you know other languages, I would just start looking at some tutorials. Good Luck! -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Scott Haneda Sent: Thursday, November 09, 2006 3:14 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Noob, basic questions on actionscript, withmethodology suggestions > Hi, > > You will need to move external_xml.load call below the onLoad > function because your file will probably be loaded before the handler is > defined (locally). > > with trace(myXML) you have defined "myXML" inside the function - > this means it is not in scope outside the function. Try: > > var external_xml:XML = new XML(); > > //trace if loaded, or not > external_xml.onLoad = function(success:Boolean) { > if (success) { > trace("xml loaded successfully."); > //Do something with the XML in here. > } else { > trace("xml failed to load."); > } > }; > > //variable loads external XML file afterwards > external_xml.load("example1.xml"); > > trace(external_xml); I get nothing at all on the final trace, not null, not undefined, just blank. -- ------------------------------------------------------------- Scott Haneda Tel: 415.898.2602 <http://www.newgeo.com> Novato, CA U.S.A. _______________________________________________ [email protected] 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 _______________________________________________ [email protected] 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

