If you plan to do a lot of Flash XML stuff, the book XML for Flash by Sas
Jacobs (2006, friendsofed) is pretty good. It is overkill however if you
only downloaded the 30 day trial version of Flash or don't need to know
about XML handling in detail. I had a lot of trouble figuring out how to
parse XML in Actionscript (do other people also find the XML class to be
clunky?) and now find it fairly easy as a result of reading the book.
Two caveats however: 1) book explains XML from scratch so if you already
understand XML in general that part is a waste. 2) book contains some
Microsoft-centric stuff which irritated me but is probably useful to many
readers. (Stuff on how to use Excel and Word to handle XML files in a Flash
development workflow which I felt was off-topic)
This is not the same book as some older friendsofed books on XML and Flash
(using A.S. 1.0/older versions of Flash) which were terrible.
Millie Niss
[EMAIL PROTECTED]
http://www.sporkworld.org
----- Original Message -----
From: "Scott Haneda" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <[email protected]>
Sent: Thursday, November 09, 2006 5:13 PM
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