The forums have permanently moved to This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

Results 1 to 4 of 4

Thread: N-Ary tree

  1. #1

    N-Ary tree

    Hi board,

    I need to display a n-ary tree. Does anybody have an implementation or logic to position the various nodes?

    The tree can be arbritrarily huge.

    Currently the nodes are library - movieClips and added to the _root using attachMovieClip and the connectors/edges are done using lines. The tree is not being displayed as of yet its just adding to nodes at random positions and drawing a line between them.

    Help. Any other stratergy to display the tree could also be used but the nodes should be draggable more precisely a node can be dragged and dropped into another node.



  2. #2

    I would like to help but i dunno what you what to achieve.

    maybe you can show what you all ready have


  3. #3

    You would get a better idea if you see

    That is a 2d model but the nodes are all around. I want to do the same thing but the child nodes are always below the parent node. The physics aren't necessary.


  4. #4
    randomleeway = 10
    spaceing = 20
    this._x = (Math.random()*randomleeway-randomleeway/2)+ParentNode._x;
    this._y = (Math.random()*randomleeway-randomleeway/2)+ParentNode._y+spaceing;
    some thing like that?


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Home About Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012