# Calling other movieClips inside other movieClips

**URL:** https://forum.kirupa.com/t/calling-other-movieclips-inside-other-movieclips/58604
**Category:** flash
**Created:** [July 23, 2004, 11:55pm UTC](https://forum.kirupa.com/t/calling-other-movieclips-inside-other-movieclips/58604 "2004-07-23T23:55:25Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Behemoth\_Dan](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@Behemoth\_Dan](https://forum.kirupa.com/u/Behemoth_Dan)
#### Post date: [July 23, 2004, 11:55pm UTC](https://forum.kirupa.com/t/calling-other-movieclips-inside-other-movieclips/58604/1 "2004-07-23T23:55:25Z")

</div>

The problem I am having is a little moe signifcant than what the titles suggests.

What I am trying to do is to determine whether a movieClip, which is nested inside another a movieClip hits another moviceClip, which, you guessed it, is inside another movieClip.

Something along the lines of this:

```auto

onClipEvent(enterFrame){
if( _root.character.charNose_mc.hitTest( this )){
   _root.character._x -= _root.char_speed;
   }
}

```

Obviously this code is not working. The movieClip the hitTest( this ) is referring to is inside another movieClip. And charNose\_mc is nested inside character at the root level. As you can tell, the goal of this code is to move the character movieClip in a negative direction using a predefined variable called char\_speed.

Any ideas on what I am doing wrong, or what is the proper way to format this code? Thanks!

---

<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: [July 24, 2004, 8:20pm UTC](https://forum.kirupa.com/t/calling-other-movieclips-inside-other-movieclips/58604/2 "2004-07-24T20:20:17Z")

</div>

I believe it might work, but what do I know…  
Another appoach might be a more mathematically one.  
Write a function that tracks the location’s and bounderies of given mc’s and let it return the information for processing.

---

<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: [July 24, 2004, 8:40pm UTC](https://forum.kirupa.com/t/calling-other-movieclips-inside-other-movieclips/58604/3 "2004-07-24T20:40:02Z")

</div>

First highlight the charNose\_mc clip. Then apply this code:  
onClipEvent(enterFrame){  
if(this.hitTest(\_root.some\_clip)){ //\_root.some\_clip should be the path of your other movie clip.  
\_root.character.\_x -= \_root.char\_speed;  
}  
}
