
Welcome Guest
|
#1
|
|||
|
|||
|
dear flashers, i'm want to accessing a xml object's attributes in flash but the only way i know how is to use the name of the attributes for example:
pointerHead.childNodes[1].attributes.name; is there any other way to access the attributes besides using the attribute name? maybe an array that will iterate through the attribute names? thanks in advance |
|
#2
|
|||
|
|||
|
u betcha ...
the attributes is a collection object, so you can do anything with it that you can a collection. Code:
str = {{{ any xml snippit }}}; // xml lost in post
doc = new XML(str);
doc.firstChild.attributes.order = "first";
doc.firstChild.attributes.order2 = "second";
doc.firstChild.attributes.order3 = "third";
for (att in doc.firstChild.attributes) {
trace(att + " = " + doc.firstChild.attributes[att]);
}
__________________
admin: sig removed broken link |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| as 2 external text file into array accessing problems | floody123 | Actionscript 2.0 |
1 | 12-03-2008 01:22 PM |
| Accessing Buttons/MC via Actionscript | MrG | Flash 8 |
6 | 11-07-2007 12:13 PM |
| Image Attributes with XML Connector | nisibee | Actionscript 2.0 Components |
0 | 07-24-2005 06:33 AM |
| xml - creating dynamic attributes | bat7 | Flash MX ActionScript |
2 | 11-15-2004 03:44 PM |
| XML Node Attributes problem! | Zev Halfon | XML & Sockets | 2 | 10-13-2000 01:30 PM |

Other Programming


