This content has been marked as final. Show 3 replies
There is a tutorial on gotoandlearn.com for a Flash mp3 player. Watch the tutorials as they will show you exactly how to do this.
>> to get infro from
>> <letter l_name = "a">
>> <item i_name="Absolut" i_video="absolut.flv"/>
>> i use this : var nodes = this.firstChild.firstChild.childNodes ;
>> but how do i get info from this one :
>> <letter l_name = "b">
>> <item i_name="Bada" i_video="bada.flv"/>
Well, the childNodes property gives you an array. In your first
example, this.firstChild.firstChild refers to the <letter> node, and the
final childNodes property then refers to the <letter> node's children. In
your code sample the <letter l_name="a"> node has five children, so you
could access them like this ...
Makes sense, right? Well, your <letter> node is *also* a child, which
means it also falls within the childNodes property of its parent. It's just
that firstChild happens to be the l_name="a" one. This reference ...
... is the same as saying this ...
... so to get to the l_name="b" ones, you could do this ...
Adobe Community Expert
Dev blog, http://www.quip.net/blog/
"Luck is the residue of good design."
Stiller, you are my hero.