# \[FMX\] arrays and loops

**URL:** <https://forum.kirupa.com/t/fmx-arrays-and-loops/100326>\
**Category:** Uncategorized\
**Created:** [January 28, 2004, 4:27am UTC](https://forum.kirupa.com/t/fmx-arrays-and-loops/100326 "2004-01-28T04:27:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maizoon](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@Maizoon](https://forum.kirupa.com/u/Maizoon)\
**Post date:** [January 28, 2004, 4:27am UTC](https://forum.kirupa.com/t/fmx-arrays-and-loops/100326/1 "2004-01-28T04:27:39Z")

</div>

My first time dealing with an array, I was wondering why the following does not work:

[AS]  
LinkOne = [“[yahoo.com](http://yahoo.com)”, “[google.com](http://google.com)”, “[msn.com](http://msn.com)”  
for (lk=0; lk\<3; lk++) {  
trace(link\_info);  
this[“first\_lnk”+lk].onRollOut = function() {  
link\_info = “”;  
};  
this[“first\_lnk”+lk].onRollOver = function() {  
link\_info = LinkOne[lk];  
};  
this[“first\_lnk”+lk].onRelease = function() {  
getURL([“[http://www](http://www).”+link\_info], “\_blank”);  
};  
}  
[/AS]  
I’m guessing the  
link\_info = LinkOne[lk];  
line is wrong. I know to reference an an array it would be  
LinkOne[“lk”]  
but it’s not working like that either.

Thanks
