# Mx actionscript problem with \_gloabl

**URL:** https://forum.kirupa.com/t/mx-actionscript-problem-with--gloabl/34153
**Category:** Uncategorized
**Created:** [October 28, 2003, 9:20pm UTC](https://forum.kirupa.com/t/mx-actionscript-problem-with--gloabl/34153 "2003-10-28T21:20:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![colag](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@colag](https://forum.kirupa.com/u/colag)
#### Post date: [October 28, 2003, 9:20pm UTC](https://forum.kirupa.com/t/mx-actionscript-problem-with--gloabl/34153/1 "2003-10-28T21:20:29Z")

</div>

hi,  
i have a movie clip with functions which relate to instances of buttons eg.

onClipEvent (enterFrame) {  
\_root.home.onRelease = function() {  
endX = 0;  
endY = 0;  
};  
}

where home equals the home button and so on for the links buttons and contact button etc.

the problem is the buttons are not found at the \_root. they are in a movie clip with an instance name ‘menu’. i have tried using this in the onClipEvent function:

\_global.menu=this;

\_global.menu.home.onRelease = function() {  
endX = 0;  
endY = 0;  
};

but no luck.  
any suggestions would be greatly appreciated.  
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: [October 28, 2003, 9:47pm UTC](https://forum.kirupa.com/t/mx-actionscript-problem-with--gloabl/34153/2 "2003-10-28T21:47:54Z")

</div>

```auto

onClipEvent (enterFrame) {
_root.home.onRelease = function() {
endX = 0;
endY = 0;
};
}

```

No need for the onEnterFrame, just the onRelease will do 😉

If home is inside a movieclip called menu, and menu is on the main timeline, you can target home by using \_root.menu.home 🙂
