# Mc.onPress not working w/ createEmptyMC

**URL:** <https://forum.kirupa.com/t/mc-onpress-not-working-w-createemptymc/103971>\
**Category:** Uncategorized\
**Created:** [March 11, 2004, 5:18am UTC](https://forum.kirupa.com/t/mc-onpress-not-working-w-createemptymc/103971 "2004-03-11T05:18:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jubba](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@Jubba](https://forum.kirupa.com/u/Jubba)\
**Post date:** [March 11, 2004, 5:18am UTC](https://forum.kirupa.com/t/mc-onpress-not-working-w-createemptymc/103971/1 "2004-03-11T05:18:58Z")

</div>

This code isn’t working for me. I have written the same thing a bazillion times, but for some reason this isn’t working for me right now…:

```auto

this.createEmptyMovieClip("container", -1);
for (ii=0; ii<xml_obj.firstChild.childNodes.length; ii++) {
                container.duplicateMovieClip("cp"+ii, ii);
	ext = this["cp"+ii];
	ext.onPress = function() {
		trace("onPress called");
	};
}

```

The MCs load into my scrollPane and everything fine, but they don’t respond to the onPress… Any idea why its not working?
