# createMovieClip, onRollover - Not Working

**URL:** <https://forum.kirupa.com/t/createmovieclip-onrollover-not-working/151058>\
**Category:** Uncategorized\
**Created:** [June 13, 2005, 12:08am UTC](https://forum.kirupa.com/t/createmovieclip-onrollover-not-working/151058 "2005-06-13T00:08:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 13, 2005, 12:08am UTC](https://forum.kirupa.com/t/createmovieclip-onrollover-not-working/151058/1 "2005-06-13T00:08:09Z")

</div>

Hi everyone,  
I’ve run into a slight problem, ironically, while going back and revising my XML PhotoGallery tutorial. Here is my code:

```auto
function thumbnails_fn(k) {
_root.createEmptyMovieClip("t"+k, this.getNextHighestDepth());
thumbMC = eval("t"+k);
thumbMC.loadMovie(thumbnails[k]);
thumbMC._y = 290;
thumbMC._x = 10+105*k;
trace(thumbMC._name);
thumbMC.onRollOver = function() {
trace("HI!");
};
}

```

The variable k simply receives the total number of images in the XML file. Using loadMovie, I can get the images to display without any problems with the correct spacing also.

Yet, the thumbMC movieclip is unresponsive to my rollover code. The movieclip acts just like a movieclip as opposed to a button. Strangely enough, a similar movie using attachMovie works.

Can anyone point me in the right direction? Does it have to do with my “\_root.” call I used earlier?

Thanks!  
Kirupa =)
