# Links in an array

**URL:** <https://forum.kirupa.com/t/links-in-an-array/236268>\
**Category:** Uncategorized\
**Created:** [August 19, 2007, 7:29am UTC](https://forum.kirupa.com/t/links-in-an-array/236268 "2007-08-19T07:29:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![robinkmedia](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@robinkmedia](https://forum.kirupa.com/u/robinkmedia)\
**Post date:** [August 19, 2007, 7:29am UTC](https://forum.kirupa.com/t/links-in-an-array/236268/1 "2007-08-19T07:29:10Z")

</div>

Hey guys hope this makes sense…  
I’m trying to have links(when pressed)- to go to a corresponding frame label- example link5 when pressed would take you to “section5”.  
The following code works fine for the rollOver and rollOut states- the problem is onRelease.  
Basically I want link\* to gotoAndStop(“section” + i)- when pressed…  
Anyway I know something’s screwy with the for loop or the way I’m combining a string with a var- or both… but any help would be really really appreciated (burning the midnight oil)…

var linkArray:Array = new Array();  
for (var i:Number = 1; i\<6; i++) {  
linkArray.push(“link”+i);  
}  
for (var i:Number = 0; i\<linkArray.length; i++) {  
var thisLink = this[linkArray\*];

```
thisLink.onRollOver = function() {
    this._alpha = 50;

};
thisLink.onRollOut = function() {
    this._alpha = 100;
};
thisLink.onRelease = function() {
    trace(thisLink);
};

```

}
