# Check if the mouse is "rollovering" a dynamicly created MC?

**URL:** <https://forum.kirupa.com/t/check-if-the-mouse-is-rollovering-a-dynamicly-created-mc/42867>\
**Category:** Uncategorized\
**Created:** [February 13, 2004, 9:08pm UTC](https://forum.kirupa.com/t/check-if-the-mouse-is-rollovering-a-dynamicly-created-mc/42867 "2004-02-13T21:08:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Uli](https://avatars.discourse-cdn.com/v4/letter/u/ccd318/32.png) [@Uli](https://forum.kirupa.com/u/Uli)\
**Post date:** [February 13, 2004, 9:08pm UTC](https://forum.kirupa.com/t/check-if-the-mouse-is-rollovering-a-dynamicly-created-mc/42867/1 "2004-02-13T21:08:40Z")

</div>

Hello,

I need help with something…

Is there a way a check if the mouse is “rollovering” a dynamicly created MC? the MC name must contains a same word + a digit

like \_root.myMC1 , \_root.myMC2 , \_root.myMC3 …

TiA 🙂

---

<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:** [February 13, 2004, 9:14pm UTC](https://forum.kirupa.com/t/check-if-the-mouse-is-rollovering-a-dynamicly-created-mc/42867/2 "2004-02-13T21:14:56Z")

</div>

```auto

dynamically_created_mc_pointer.onRollOver = function(){
if(this._name.substr(0,4) == "myMC"){
//this movieclip was dynamically created
}
}

```

Something like that ?

---

<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:** [February 13, 2004, 11:21pm UTC](https://forum.kirupa.com/t/check-if-the-mouse-is-rollovering-a-dynamicly-created-mc/42867/3 "2004-02-13T23:21:26Z")

</div>

thanks i’m gonna try it out and give you some feed back 🙂

---

<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:** [February 17, 2004, 10:17pm UTC](https://forum.kirupa.com/t/check-if-the-mouse-is-rollovering-a-dynamicly-created-mc/42867/4 "2004-02-17T22:17:09Z")

</div>

here’s what i’m trying to do… maybe you could give me a direction, i’m not sure i’m going the right way, and i’m still learning…

Here the 1st part of the code

[AS]  
onClipEvent (load) {  
\_root.createEmptyMovieClip(“holder”, 10);  
//\_root.holder.\_visible = false;  
loadText = new LoadVars();  
loadText.load(“test.txt”);  
loadText.onLoad = function() {  
if (this.total != 0) {  
for (i=1; i\<=this.total; i++) {  
\_root.holder.createEmptyMovieClip([“imageholder”+i], 100+i);  
\_root.holder[“imageholder”+i].\_x = (100_i-100)+5_i;  
loadMovie(this[“imageth”+i], \_root.holder[“imageholder”+i]);

```
		}
	}
};

```

}  
[/AS]

i load 100\*100 thumbnails pictures and create a MC to hold each thumb… This is fine…  
Now i’d like to be able to click on the MC holding the thumbnails and depending of the thumbnail , dynamicly loads another large picture x (from test.txt i.e. &largepicx=photox.jpg with x beeing a variable)

so i was looking for a way to say

onClipEvent(enterFrame){  
\_root.holder.onRollOver = function(){  
//check what children im rollovering on and report it’s “ID” and if i click then open this.largepic(x)}

Is it possible? Sorry if it isn’t so clear…

TiA for your time 🙂

---

<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:** [February 17, 2004, 11:08pm UTC](https://forum.kirupa.com/t/check-if-the-mouse-is-rollovering-a-dynamicly-created-mc/42867/5 "2004-02-17T23:08:46Z")

</div>

nm found a solution by duplication MC containing a button and by checking the name of the duplication MC when clicking its button…
