PDA

Click to See Complete Forum and Search --> : Actionscript 3: Assigning XML data to a variable


reuber1
08-20-2008, 02:58 PM
I've searched the internets and I can pull XML data just fine, trace it and it shows all regular-like in the Output window, but since I'm new to the ridiculously complex world of Actionscript 3, I have no idea how to actually assign the XML data I have to a variable, so I can actually use it.

Any suggestions?

Two-Toe Tom
08-21-2008, 02:20 AM
Have you loaded the xml with a URLLoader and put it in an XML object? if so, you can reference the data by like so:

my_variable = my_xml_object.entry[1].attribute;

reuber1
08-21-2008, 01:59 PM
Have you loaded the xml with a URLLoader and put it in an XML object? if so, you can reference the data by like so:

my_variable = my_xml_object.entry[1].attribute;
That would be the guy I'm looking for. Thanks!

Yeah, I already am able to load the data, but the only tuts I've stumbled across teach me how to trace the data into the output window.

MikeTheVike
08-21-2008, 02:56 PM
Did you get everything working?

reuber1
08-21-2008, 03:20 PM
Did you get everything working?
I haven't had a chance to yet, have a few other things in my way at the moment, but will hopefully get to this soon. This is just one thing in a massive project that I've got, and I think it might be a bit outside of my scope. :(

reuber1
08-21-2008, 07:09 PM
...and put it in an XML object?
OK, I haven't done this, and I have no idea how. Any help?

Why are all the tutorials I find on AS3 so ****ing vague? :rolleyes:

MikeTheVike
08-21-2008, 07:37 PM
OK, I haven't done this, and I have no idea how. Any help?

Why are all the tutorials I find on AS3 so ****ing vague? :rolleyes:

I can help you, but I'm about to head out for the day, I'll try to get you some stuff tomorrow! In the mean time, posting your xml file format will be helpful...

Two-Toe Tom
08-21-2008, 08:01 PM
just declare an XML object like var xml:XML;, and go xml = XML(your_object);