if have a menu that i got from a book i picked up on actionscripting (something i've been trying to learn as i go)

it's a object to object menu and my problem (besides a lack of scipting knoledge) is how to give each preceeding box a name. the way it's set up in the book is with numbers and the code is like this:

boxNumber = _parent._name;
thisLineName = "_root.line" + boxNumber;

boxX = _parent._x;
boxY = _parent._y

previousBox = "_root." + (boxNumber - 1);

previousBoxX = getProperty(previousBox, _x)
previousBoxY = getProperty(previousBox, _y)

and then the text block on the box has

(the var) = this._name;

and so the text on the boxes is numbers increasing to however many boxes i have on the menu. i want the numbers to be links with text (hince an actual menu) and i've been playing around with simple things that i thought could have done some good, but with no luck. is there anyone that could help me with this problem? i'd appritiate it very much!