# Getting information from array

**URL:** <https://forum.kirupa.com/t/getting-information-from-array/317710>\
**Category:** flash\
**Created:** [December 30, 2010, 7:48pm UTC](https://forum.kirupa.com/t/getting-information-from-array/317710 "2010-12-30T19:48:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![simoneidenskog](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@simoneidenskog](https://forum.kirupa.com/u/simoneidenskog)\
**Post date:** [December 30, 2010, 7:48pm UTC](https://forum.kirupa.com/t/getting-information-from-array/317710/1 "2010-12-30T19:48:22Z")

</div>

Hi!

I’ve got a problem and would be very glad for your help.

I’ve got an array, events, where I store objectdata, such as  
events.id (String), events.action (String) and events.time (Number).

In a for-loop, I want to go through the array and for each object I want to connect a Timer which runs the function “takeIt” which runs the public function “newEvent”. The object in the array, events.id contains information about the object which is running newEvent, and in the array, events.action there are alse information which action to use. The events\*.time contains information about the timer delay which seems to work.

How should I write this to make it work?

```auto
          
 for (var i:int = 0; i < events.length; i++) {
            
                
                    function takeIt(e:TimerEvent) {
                        

                         //this I need help width
**events[id].newEvent(this[action]);**
                        

                        //could be
                        video1.newEvent("Start");

                        
                        

                            
                        //var
                    
                        
                    }
                
             
                var timer:Timer = new Timer(events*.time, 1);
                timer.addEventListener(TimerEvent.TIMER_COMPLETE, takeIt);
                timer.start(); }    

```

Happy new year

Regards Simon
