JChristian
01-09-2009, 05:08 PM
Hey, I've got the following code in my application & it keeps giving me 1120: Access of undefined property of xmlLoader & xmlString:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import flash;
var xmlString:URLRequest = new URLRequest("http://66.179.17.30/jk/leaderBoardTest2.xml");
var xmlLoader:URLLoader = new URLLoader();
xmlLoader.addEventListener(Event.COMPLETE, function(e:Event):void {
var CarsXML:XML = new XML(e.target.data);
for each (var section:XML in CarsXML.section) {
if (section.attributes()=="new") {
var NewXML:XML = new XML(section);
} else if (section.attributes()=="used") {
var UsedXML:XML = new XML(section);
}
}
});
xmlLoader.load(xmlString);
]]>
</mx:Script>
</mx:Application>
I mean, their defined & declared ... I've tried everything, hence the
import flash;
Any help will keep me from pulling out my hair.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import flash;
var xmlString:URLRequest = new URLRequest("http://66.179.17.30/jk/leaderBoardTest2.xml");
var xmlLoader:URLLoader = new URLLoader();
xmlLoader.addEventListener(Event.COMPLETE, function(e:Event):void {
var CarsXML:XML = new XML(e.target.data);
for each (var section:XML in CarsXML.section) {
if (section.attributes()=="new") {
var NewXML:XML = new XML(section);
} else if (section.attributes()=="used") {
var UsedXML:XML = new XML(section);
}
}
});
xmlLoader.load(xmlString);
]]>
</mx:Script>
</mx:Application>
I mean, their defined & declared ... I've tried everything, hence the
import flash;
Any help will keep me from pulling out my hair.