I have this simple XML file, witch I’m calling in a SWF file. This is the code:
<goals1>
<minute>32</minute>
<name>Name</name>
<minute>35</minute>
<name>Name2</name>
</goals1>
So these nodes are going to be empty. They are even not going to exist. But I’m going to put the paths in to the AS2. So my question is: – What to do to make them not showing “undefined” in the swf file. In other words I need to display content when there is any.
Thank You!
If you got no whitespace, you’d simply check is that node is empty or not.
You could also run a for() based on the length of an xml object to only execute given children.
Something like this: