# \[FMX\].mc control problem

**URL:** <https://forum.kirupa.com/t/fmx-mc-control-problem/28016>\
**Category:** flash\
**Created:** [August 8, 2003, 10:05pm UTC](https://forum.kirupa.com/t/fmx-mc-control-problem/28016 "2003-08-08T22:05:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheMerryMaker](https://avatars.discourse-cdn.com/v4/letter/t/c57346/32.png) [@TheMerryMaker](https://forum.kirupa.com/u/TheMerryMaker)\
**Post date:** [August 8, 2003, 10:05pm UTC](https://forum.kirupa.com/t/fmx-mc-control-problem/28016/1 "2003-08-08T22:05:56Z")

</div>

what im trying to do here is have a button’s (named btn) over and out states make a movie clip play forward or reverse. and my fla is named MCC. im fairly new so the more detailed explaination of the code the better.

this is my code so far in the MC

> 

onClipEvent (enterFrame) {  
if (btn.MCC(\_root.\_xmouse, \_root.\_ymouse, true)) {  
this.nextFrame();  
} else {  
this.prevFrame();  
}  
}

---

<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:** [August 8, 2003, 11:46pm UTC](https://forum.kirupa.com/t/fmx-mc-control-problem/28016/2 "2003-08-08T23:46:44Z")

</div>

[AS]onClipEvent (enterFrame) {  
if (\_parent.btn.hitTest(\_root.\_xmouse, \_root.\_ymouse, true)) {  
this.nextFrame();  
} else {  
this.prevFrame();  
}  
}[/AS]  
And add this line of code to the Frame Actions:  
[AS]Button.prototype.hitTest = MovieClip.prototype.hitTest;[/AS]

---

<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:** [August 9, 2003, 12:55am UTC](https://forum.kirupa.com/t/fmx-mc-control-problem/28016/3 "2003-08-09T00:55:58Z")

</div>

woohoo, thanks a bunch. now the maddness can begin

---

<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:** [August 9, 2003, 12:57am UTC](https://forum.kirupa.com/t/fmx-mc-control-problem/28016/4 "2003-08-09T00:57:48Z")

</div>

No problem. 😉
