# As3 referencing from an object within an array

**URL:** <https://forum.kirupa.com/t/as3-referencing-from-an-object-within-an-array/325452>\
**Category:** flash\
**Created:** [October 17, 2011, 3:57am UTC](https://forum.kirupa.com/t/as3-referencing-from-an-object-within-an-array/325452 "2011-10-17T03:57:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wisker](https://avatars.discourse-cdn.com/v4/letter/w/b19c9b/32.png) [@wisker](https://forum.kirupa.com/u/wisker)\
**Post date:** [October 17, 2011, 3:57am UTC](https://forum.kirupa.com/t/as3-referencing-from-an-object-within-an-array/325452/1 "2011-10-17T03:57:53Z")

</div>

Hi  
I have a several objects nested within an array.  
I’m trying to reference a property of one specific object (intel).

function eventGenerator():void  
{  
var randomArea:Number;  
randomArea = Math.ceil(Math.random()\*5);  
var eventArea= ainPlaceNames[randomArea];  
trace(eventArea.intel)

}

ainPlace names is the array’s name. The random area variable contains the co ordinate on the array for the object. Each object on the array has a property called intel. The idea is I want to able to store the value of intel in a number and use in an equation. I would also like to be able to adjust the number. Would anyone here be able to help? O\_\_\_o  
the trace function here returns an error saying it is undefined so eventArea.intel for some reason isn’t referencing the intel property of the object.  
cheers
