# \[FMX\] Need help with function creating

**URL:** <https://forum.kirupa.com/t/fmx-need-help-with-function-creating/284932>\
**Category:** Uncategorized\
**Created:** [March 25, 2009, 9:20am UTC](https://forum.kirupa.com/t/fmx-need-help-with-function-creating/284932 "2009-03-25T09:20:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sledziu](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@sledziu](https://forum.kirupa.com/u/sledziu)\
**Post date:** [March 25, 2009, 9:20am UTC](https://forum.kirupa.com/t/fmx-need-help-with-function-creating/284932/1 "2009-03-25T09:20:52Z")

</div>

Hi,

I have the problem with creating multiply functions. I want to create onRelease function for every item in array that will navigate to specific URL from xml.

Here is the code:

for(var i=0;i\<numOfItems;i++)  
{  
var t = home.attachMovie(“item”,“item”+i,i+1);  
t.icon.inner.loadMovie(nodes\*.attributes.image);  
t.r.inner.loadMovie(nodes\*.attributes.image);  
// Get item X position on stage  
var xpos = i_spacing + minSize/2;  
xpos += 40; // Center on stage  
// Set position and keep origional x position in emmory  
t.\_x = t.x = xpos;  
t.\_y = t.y = centerY;  
itemsArray_ = t;

```
		////////release//////////////////
					
		**itemsArray*.onRelease = function()
		{
			trace(nodes*.attributes.urll);
		}**
	}

```

The problem is that the trace for url will work if I put nodes[0] for example instead of \*. I don’t know how to solve it. Please help me.

Sory for bad english.
