Generating links


I am trying to generate a list of links via xml using as3. I have created a movie linkHolder and a text field called linkText.

I then add link text to linkHolder and add linkHolder to the stage. I have an eventListener attached to linkHOlder which calls a function and when I roll over the links it activates the function correctly.

How do I give a unique id or reference to each button so that I can pull up the correct link associated with it?

Here’s some of my code:

function createVideoLinks():void{
 for (var i:int=0; i<externalXML.videoClip.length();i++){
 //build the arrays of link text and link destination
 vidLink*=externalXML.videoClip*[email protected];
 var linkHolder:MovieClip = new MovieClip();
 var linkText:TextField = new TextField();
 linkText.text = vidText*;
 linkText.x=1; linkText.y=(108+i*20); linkText.width=205;
 linkHolder.addEventListener(MouseEvent.MOUSE_OVER, overHandler);
function overHandler(event:MouseEvent):void {
 trace ("you are in overHandler=";//when roll over butto

When Idid this in AS2 I would have a movieclip called pageButton to which I would do this: = i;
   pageButton.onRollOver = function():Void  {

In otherwords I could set properties to each button

HOw do I do this in as3.