# Two questions: Iterate object in an MC? Pass arguments to a function trough an Event?

**URL:** <https://forum.kirupa.com/t/two-questions-iterate-object-in-an-mc-pass-arguments-to-a-function-trough-an-event/292542>\
**Category:** flash\
**Created:** [July 15, 2009, 3:03pm UTC](https://forum.kirupa.com/t/two-questions-iterate-object-in-an-mc-pass-arguments-to-a-function-trough-an-event/292542 "2009-07-15T15:03:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Veng](https://avatars.discourse-cdn.com/v4/letter/v/46a35a/32.png) [@Veng](https://forum.kirupa.com/u/Veng)\
**Post date:** [July 15, 2009, 3:03pm UTC](https://forum.kirupa.com/t/two-questions-iterate-object-in-an-mc-pass-arguments-to-a-function-trough-an-event/292542/1 "2009-07-15T15:03:19Z")

</div>

1. In AS2 if I used:

for (i in myMC:MovieClip) {  
trace(myMC\*); or trace(i);  
}

i could get first the path of the other movieClips inside myMC and second just the name of the instance of the movieClips inside my MC. In AS3 if i do that my trace is blank. Is there anyway i can iterate the contents of an DisplayObject Container and moreover can i iterate it from stage so i can get all that is in the documets display list?

1. If i initiate a function using an EventListener (let’s say a MouseEvent) how can i pass arguments to that function? I know i can pass arguments to it if it has no listeners related to it and i use function(arg1, arg2, arg); But how do i do it through an EventListener?

Thanks a lot.
