Hi all,
I'm new to Flex and AS3 (well, I guess everyone's "new" to AS3) and
am having difficulty with what should be basic and simple - loading an
external xml file. I can't even get the examples in Help to work
(Flex 2beta):
1 var externalXML:XML;
2 var loader:URLLoader = new URLLoader();
3 var request:URLRequest = new URLRequest("xmlFile.xml");
4 loader.load(request);
5 loader.addEventListener(EventType.COMPLETE, onComplete);
6
7 function onComplete(event:Event):Void{
8 var loader:URLLoader = URLLoader(event.target);
9 externalXML = new XML(loader.data);
10 trace(externalXML.toXMLString());
11 }
This gives me an error at line 7 - Void is not a compile time constant.
If I change that to lowercase void (or any other valid constant) or
remove the type declaration :Void altogether I get two errors at lines
4 and 5 telling me that "request" and "loader" are undefined
properties, even though they're defined immediately above. What
gives? and thanks in advance for your help!
Rick Englert
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/