Call functions

Ok! So this has baffled me for a while now and its getting on my nerves. I have flash cs4, using actionscript 2 to build a portfolio. I found this link http://www.flashkit.com/jump.php?ID=10271&type=movies

i would like to use it as a section for the links to other websites. this is the function used for each ‘button’

function doAction(buttonNum)
{
     trace(buttonNum)
     switch(buttonNum)
     {
         case 1:
         break;
         
         case 2:
         break;

         case 3:
         break;
         
         case 4:
         break;
         
         case 5:
         break;
         
         case 6:
         break;

         case 7:
         break;
         
         case 8:
         break;
     }
     
}

and i would like to incorporate this code to the ‘button’ as well:

myButton.addEventListener(MouseEvent.CLICK, openURL, false, 0, true);
 

    function openURL(e:MouseEvent):void
    {
       var u:URLRequest = new URLRequest;
     
       switch(e.target)
       {
          case 1:
             u.url = "http://www.mysite.com";
             break;
     
          case 2:
             u.url = "http://www.myothersite.com";
             break;
     
          default:
             throw new Error("No URL set for " + e.target);
             return;
       }
     
       navigateToURL(u, "_blank");
    }

i’m having the hardest time linking the on release command to the second function. is anyone able to help me?