This content has been marked as final. Show 4 replies
well you will need to find out how many video nodes are in those 7 xml files and display that count in a text field, once you count all the nodes simply update the text field (dynamic_txt.text = "video count: " + nodeCount;
an easy way to count how many nodes is to go to the parent of all the item tags and get the childNodes, XML.childNodes returns an array so you can do something like this.
var myVideoArray:Array = my_xml.childNodes;
trace("video count: " + myVideoArray.count);
if you have videos in all 7 files, simply repeat the process and store each video array count into a total variable and then print that variable.
Thank you for the fast answear.
I never used child.Nodes before and to be honest im pretty new to as aswell.
I really appreciate all the help i get in the start.
My xml doc is called a_b.xml
In the doc it looks like this: (i took away about 200 videonodes)
<letter l_name = "a">
<item i_name="Absolut" i_video="absolut.flv"/>
<item i_name="Accept" i_video="accept.flv"/>
<item i_name="Adres" i_video="adres.flv"/>
"an easy way to count how many nodes is to go to the parent of all the item tags and get the childNodes,"
XML.childNodes how will this look like if my doc is called a_b to get all the nodes, i looking around everywhere.... my brain is manfunction righ now -.-
This is hard -.-
To learn more about XML i suggest heading over to w3schools.org they have great information on the subject for free. http://www.w3schools.com/xml/default.asp also for using XML in flash i recommend reading information on the XML class on adobe's live docs: Start here: http://livedocs.adobe.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/js/html/wwhelp.htm?href=000 00138.html
also another good tutorial on XML in flash. http://www.actionscript.org/resources/articles/9/1/XML-101/Page1.html
Oh thank you mclem.
This is just what i need.