public class FightGame extends MovieClip
{
private var _character:Character;
private var antagonist:MovieClip;
private var loadit:Loader;
public var charList:XML; // This is completely defined!!!
public var charLoader:URLLoader = new URLLoader();
public function FightGame()
{
charLoader.load(new URLRequest("charlist/charlist.xml"));
charLoader.addEventListener(Event.COMPLETE, processXML);
function processXML(e:Event):void
{
charList = new XML(e.target.data);
}
}
trace(charList.CHARACTER.length()); // Error occurs at this line
}
}
Says 1120: Access of undefined Property charList.
This is driving me nuts! Please help.