# Multiple picture URL links

**URL:** <https://forum.kirupa.com/t/multiple-picture-url-links/284948>\
**Category:** flash\
**Created:** [March 25, 2009, 1:21pm UTC](https://forum.kirupa.com/t/multiple-picture-url-links/284948 "2009-03-25T13:21:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnyct9760](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@johnyct9760](https://forum.kirupa.com/u/johnyct9760)\
**Post date:** [March 25, 2009, 1:21pm UTC](https://forum.kirupa.com/t/multiple-picture-url-links/284948/1 "2009-03-25T13:21:02Z")

</div>

[FONT=Times New Roman][SIZE=3][/SIZE][/FONT]  
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]  
[SIZE=3][FONT=Times New Roman]I have kind of a follow up question what would the procedure be if I had like a slide show and each slide when you clicked on it there would be multiple links this is the code I have so far:[/FONT][/SIZE]  
[SIZE=3][FONT=Times New Roman] **My slideshow instance names are pic\_000\_mc to pic\_004\_mc** [/FONT][/SIZE]  
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]  
[SIZE=3][FONT=Times New Roman]

```php

 
var link_000:URLRequest = new URLRequest("http://www.somelink.com");
var link_001:URLRequest = new URLRequest("http://www.somelink.com");
var link_002:URLRequest = new URLRequest("http://www.somelink.com");
var link_003:URLRequest = new URLRequest("http://www.somelink.com");
var link_004:URLRequest = new URLRequest("http://www.somelink.com");
 
// here is where I get stuck I'm not sure what to add for the listener since there is like 5 buttons
addEventListener(MouseEvent.CLICK, onClick,false,0,true)
function onClick(event:MouseEvent):void
{
            pic_000_mc.navigateToURL(link_000);
            pic_001_mc.navigateToURL(link_001);
            pic_002_mc.navigateToURL(link_002);
            pic_003_mc.navigateToURL(link_003);
            pic_004_mc.navigateToURL(link_004);
}

```

[/FONT][/SIZE]  
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]  
[FONT=Times New Roman][SIZE=3]I know there is a better and more efficient way to do this then to have all five different functions and listeners. Does any one have any idea?[/SIZE][/FONT]
