I'm currently converting an AS2 project to AS3 and need a little help with XML. I've got it reading the file fine, but for some dumb reason I can't set a variable from the data received. I get this message when testing...
TypeError: Error #1010: A term is undefined and has no properties.
Here's my code (attached also)...
var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
xml = new XML(e.target.data);
xml.ignoreWhitespace = true;
//returns first TK element
trace("Number of TKs: "+ xml.TKprs.TKnum);
var Crap:Number = xml.Tkprs.TKnum;
The variable "Crap" is where I get the error.
This is probably so easy but I've already converted tons of code and just can't get this one.
Thanks for being nice to the "virgin"...