2 Replies Latest reply on Jan 2, 2007 9:13 AM by jlingwai

    adding linkbutton

    jlingwai Level 1
      Hi,
      Im tring to add a link button using actionscript but I am unable to add a click function to the link. Here is what I have so far.
      var addLink:LinkButton = new LinkButton();
      addLink.label = "Link"+cnt;
      addLink.addEventListener("click",clickBack(cnt));
      NavBar.addChild(addLink);

      The problem is when it goes to create the linkbutton it dispatches the clickBack function, but I only want it to happen when the link is clicked.

      Any ideas?