# Help with gotoURL

**URL:** <https://forum.kirupa.com/t/help-with-gotourl/328524>\
**Category:** flash\
**Created:** [May 23, 2012, 9:11am UTC](https://forum.kirupa.com/t/help-with-gotourl/328524 "2012-05-23T09:11:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iMitchellHD](https://avatars.discourse-cdn.com/v4/letter/i/d26b3c/32.png) [@iMitchellHD](https://forum.kirupa.com/u/iMitchellHD)\
**Post date:** [May 23, 2012, 9:11am UTC](https://forum.kirupa.com/t/help-with-gotourl/328524/1 "2012-05-23T09:11:22Z")

</div>

Hi,  
I’m trying to make a set of buttons within a holder MC go to various links on a webpage

```auto
button1.addEventListener(MouseEvent.CLICK, onMouseClick, false, 0, true);button1.name = "http://www.hyundai-car.co.uk/testDrive/";button2.addEventListener(MouseEvent.CLICK, onMouseClick, false, 0, true);button2.name = "http://www.hyundai-car.co.uk/brochures/";
button3.addEventListener(MouseEvent.CLICK, onMouseClick, false, 0, true);button3.name = "http://www.hyundaiapproved.co.uk/";
button4.addEventListener(MouseEvent.CLICK, onMouseClick, false, 0, true);button4.name = "http://www.hyundai-car.co.uk/contact/";
button5.addEventListener(MouseEvent.CLICK, onMouseClick, false, 0, true);button5.name = "http://www.hyundai-car.co.uk/newCars/";

function onMouseClick(event:MouseEvent):void 
{
  trace("clicked");
  // var req:URLRequest = new URLRequest(evt.currentTarget.name);
  // navigateToURL(req, "_self"); // this opens the URL in the same flash tab
  // navigateToURL(req, "_blank"); //this opens a new browser tab
}

```

This is my code at the moment, does anyone know why it’s not working?

Thanks in Advance

sorry i should add that only button one displays the “Clicked” trace
