butterflykisses
04-10-2003, 11:14 AM
hi....
i'm a newbie in using flash...i'm not sure if my problem is simple that's why i decided to post my query on General Help instead...
anyway, i need to display a hierarchy diagram that looks like this:
O
/\
O O
/|\
o o o
the label of the circles would be based on my XML data (in this case the <NODE_NAME> ) ..... how will i go about this?
below is how my XML looks....... the <LEVEL> node is the one responsible so that we will know whether a node is a parent or a child or a grandchild..... in this case <LEVEL>1</LEVEL> is the parent... <LEVEL>2</LEVEL> is the child and <LEVEL>3</LEVEL> is the grandchild..... we will know to whose parent a child belongs based on the </PARENT_NODE_ID>.... so in the XML below, all the nodes with level=3 belongs to <NODE_ID>103488</NODE_ID> because their <PARENT_NODE_ID>103488</PARENT_NODE_ID>
thanks in advance!
<ROWSET>
<ROW num="1">
<NODE_ID>120</NODE_ID>
<NODE_NAME>school</NODE_NAME>
<PARENT_NODE_ID>3</PARENT_NODE_ID>
<LEVEL>1</LEVEL>
</ROW>
<ROW num="2">
<NODE_ID>103488</NODE_ID>
<NODE_NAME>teacher1</NODE_NAME>
<PARENT_NODE_ID>120</PARENT_NODE_ID>
<LEVEL>2</LEVEL>
</ROW>
<ROW num="3">
<NODE_ID>103489</NODE_ID>
<NODE_NAME>student1</NODE_NAME>
<PARENT_NODE_ID>103488</PARENT_NODE_ID>
<LEVEL>3</LEVEL>
</ROW>
<ROW num="4">
<NODE_ID>103490</NODE_ID>
<NODE_NAME>student2</NODE_NAME>
<PARENT_NODE_ID>103488</PARENT_NODE_ID>
<LEVEL>3</LEVEL>
</ROW>
<ROW num="5">
<NODE_ID>113489</NODE_ID>
<NODE_NAME>teacher2</NODE_NAME>
<PARENT_NODE_ID>120</PARENT_NODE_ID>
<LEVEL>2</LEVEL>
</ROW>
</ROWSET>
i'm a newbie in using flash...i'm not sure if my problem is simple that's why i decided to post my query on General Help instead...
anyway, i need to display a hierarchy diagram that looks like this:
O
/\
O O
/|\
o o o
the label of the circles would be based on my XML data (in this case the <NODE_NAME> ) ..... how will i go about this?
below is how my XML looks....... the <LEVEL> node is the one responsible so that we will know whether a node is a parent or a child or a grandchild..... in this case <LEVEL>1</LEVEL> is the parent... <LEVEL>2</LEVEL> is the child and <LEVEL>3</LEVEL> is the grandchild..... we will know to whose parent a child belongs based on the </PARENT_NODE_ID>.... so in the XML below, all the nodes with level=3 belongs to <NODE_ID>103488</NODE_ID> because their <PARENT_NODE_ID>103488</PARENT_NODE_ID>
thanks in advance!
<ROWSET>
<ROW num="1">
<NODE_ID>120</NODE_ID>
<NODE_NAME>school</NODE_NAME>
<PARENT_NODE_ID>3</PARENT_NODE_ID>
<LEVEL>1</LEVEL>
</ROW>
<ROW num="2">
<NODE_ID>103488</NODE_ID>
<NODE_NAME>teacher1</NODE_NAME>
<PARENT_NODE_ID>120</PARENT_NODE_ID>
<LEVEL>2</LEVEL>
</ROW>
<ROW num="3">
<NODE_ID>103489</NODE_ID>
<NODE_NAME>student1</NODE_NAME>
<PARENT_NODE_ID>103488</PARENT_NODE_ID>
<LEVEL>3</LEVEL>
</ROW>
<ROW num="4">
<NODE_ID>103490</NODE_ID>
<NODE_NAME>student2</NODE_NAME>
<PARENT_NODE_ID>103488</PARENT_NODE_ID>
<LEVEL>3</LEVEL>
</ROW>
<ROW num="5">
<NODE_ID>113489</NODE_ID>
<NODE_NAME>teacher2</NODE_NAME>
<PARENT_NODE_ID>120</PARENT_NODE_ID>
<LEVEL>2</LEVEL>
</ROW>
</ROWSET>