I am trying to do the following in a flex application (it is
stright from the help file):
var myXML:XML = new XML();
var XML_URL:String = "i have put my url in her e and i know
that it works";
var myXMLURL:URLRequest = new URLRequest(XML_URL);
var myLoader:URLLoader = new URLLoader(myXMLURL);
myXML = XML(myLoader.data);
but i get the errors:
1120: Access of undefined property myLoader. main.mxml
1120: Access of undefined property xmlLoaded. main.mxml
in the problems pane.
do I need to import some classes or something? I am used to
Flash AS 2 in Flash8 but havent used that in a while. This should
be something obvious I have missed?
Is all that code above "function xmlLoaded" in the root of a
script block? That is, NOT in a function? If so, put everything but
the variable declaration into a function, and call that function
from creationComplete of the main tag.