Hi
i can read everything from my xml file except a part that i can always get teh first items of each category (it will make more sence in a sec)
So here is my xml
[HTML]<?xml version="1.0" encoding="UTF-8"?>
<flashxml>
<second_page>
<sp text="ss ptextj"/>
<ss text="sptext"/>
<clas text="clas"/>
</second_page>
<third_page>
<ss>
<category name="categor">
<item>3333</item>
<item>H4444</item>
<item>etc etc etc </item>
</category>
<category name="security ">
<item>SSL</item>
<item>Hacke</item>
<item>etc etc etc </item>
</category>
</ss>
<sp>
<category name="security a">
<item>SSL lallalala</item>
<item>Hacker</item>
<item>etc etc etc </item>
</category>
<category name="onlin">
<item>Hussle free</item>
<item>Diafore</item>
<item>etc etc 2 </item>
</category>
</sp>
<classifieds>
<category name="Best">
<item>Additem1</item>
<item>Additem2</item>
<item>Additem3 </item>
</category>
</classifieds>
</third_page>
</flashxml>[/HTML]
I am trying for each category in the xml to get the relevant items ...
The problem is that if i try to read for e.g the second set of items for the second category of <sp> using a counter it throws a type error
TypeError: Error #1010: A term is undefined and has no properties.
at MethodInfo-1()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunctio n()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()
so the following works
- var itemslist:XMLList = xml.third_page.ss.category[0].item;
(it will always display the first items of the first category for all the categories
so for instance for sp will always return even for the second category
<item>SSL lallalala</item>
<item>Hacker</item>
<item>etc etc etc </item>
but when i am using
- var itemslist:XMLList = xml.third_page.ss.category[i].item;
i am getting the type error above TypeError: Error #1010 .. (no idea why)
Any help will be much appreciated
complete code ::