use the urlloader class to load an xml file.
Thanks for the reply...
But I can't find any information on using the URLLoader class in Actionscript 2. This is an Actionscript 2 project that I don't have the time or the knowlage to try convert to AS3. What I need is the AS2 XML Connector Component, I just can't find it anyplace in CS5.5. Where did they move it to? or is it gone?. The cs5.5 help files link me over to the AS2 reference guide. I found lots of references to it in the AS 2 guide in the cs5.5 help files but they all start with....
- Confirm that your Publish Settings specify ActionScript 2.0.
- Add an instance of the XMLConnector component to your application and give it an instance name.
So the problem is, I can't find an "instance" of the XML Connector Component any place in flash CS5.5. I do see all the parameters and the trigger method listed in the script window but can't find the "component". All the sample scripts I've found on using the XMLconnect have a line to import the component and when I try to use them it throws an error.
In fact I can't find any of the "Data" components that were in my older copy of flash. So I asume that Adobe , in their collective wisdom, decided we didn't need them any more so I guess the question needs to be...
Given that this project must use actionscript 2, and that the XML connector Component appearently doesn't exsist any more. How do I do the job it did to get an XML file into my AS2 flash project. if I can get it loaded I can use the inspector, as I use to I assume, to bind it. Any code example or links to some would be appreciated.
with as2, use the xml class.
Thanks, I will give it a shot.
It's not as easy as using a component and adujucting properties but i think I can make it work
it's pretty straight-forward:
var xml:XML = new XML();
xml.onData = parseXML;
I got the XML class to work but Wow, what a royal PITB. Since using the XML class is not a "component" then I can't use the component inspector to parse and bind the data. Unless I missed something I have to now manually code all this. I can't believe I have to spend over an hour writing/testing code to load and the parse this xml file when I use to be able to load the xml file , parse, and bind the data to my txt boxes with just a few clicks of the mouse using the XML connector and the component inspector. it all took < 5 min and the only code I had to write was the trigger(). Why did they make it so much harder, what am I missing? Please tell me that there is some kind of code assistant or other component that can take care of this. I'm an animator/designer and while I can usually figure out how to write enough code to get what i want or to get in trouble, it's really not what I want to spend my time on. Flash use to be great in letting me point and click passed writting a lot of code. Can someone please explain why they got rid of these useful components? what is the logic here ?? How did this improve the user experience ??
Thanks, As I mentioned I did get it to work. now I'm trying to figiure out how to bind the data to my text boxes and I'm having to figure out all the child heirarcy stuff and how that works. I'm close but no cigar yet . I guess it will be a benifit to understand how the nuts and bolts work but it sure was a lot easier to just click on this tag and say put it in this text box and be done. thanks for your help and sorry for my little soap box outburst
you only need to understand a few things (attributes, childNodes, firstChild, nextSibling and nodeValue) and use trace() to make sure you are where you want to be in the hierarchy.