# How to add more conditions to a If Then... Ill explain... hELP

**URL:** <https://forum.kirupa.com/t/how-to-add-more-conditions-to-a-if-then-ill-explain-help/116855>\
**Category:** Uncategorized\
**Created:** [July 21, 2004, 10:21pm UTC](https://forum.kirupa.com/t/how-to-add-more-conditions-to-a-if-then-ill-explain-help/116855 "2004-07-21T22:21:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mlkedave](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@mlkedave](https://forum.kirupa.com/u/mlkedave)\
**Post date:** [July 21, 2004, 10:21pm UTC](https://forum.kirupa.com/t/how-to-add-more-conditions-to-a-if-then-ill-explain-help/116855/1 "2004-07-21T22:21:12Z")

</div>

Ok here is the problem… I have this code:  
[AS]  
onClipEvent (enterFrame) {  
if (this.hitTest(\_root.\_xmouse, \_root.\_ymouse, true)) {  
} else {  
this.gotoAndStop(1);  
\_root.SUB.gotoAndStop(1);  
}  
}  
[/AS]  
The thing is I want to make it so it checks to see if my mouse is over the button (which the code i have already does) and ALSO checks to make sure a movieclip is on frame one.

So it would be something like:  
[AS]  
onClipEvent (enterFrame) {  
if (this.hitTest(\_root.\_xmouse, \_root.\_ymouse, true) and MovieClip is on Frame 1) {  
} else {  
this.gotoAndStop(1);  
\_root.SUB.gotoAndStop(1);  
}  
}  
[/AS]  
of course that isn’t proper action script but i am tyring to get my question across… THank you very much.

Mike

---

<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 21, 2004, 10:53pm UTC](https://forum.kirupa.com/t/how-to-add-more-conditions-to-a-if-then-ill-explain-help/116855/2 "2004-07-21T22:53:56Z")

</div>

[AS]  
onClipEvent(enterFrame)  
{  
if (this.hitTest(\_root.\_xmouse, \_root.\_ymouse, true) && clip\_mc.\_currentframe == 1)  
{  
//some code  
}  
else  
{  
this.gotoAndStop(1);  
\_root.SUB.gotoAndStop(1);  
}  
}  
[/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:** [July 21, 2004, 11:53pm UTC](https://forum.kirupa.com/t/how-to-add-more-conditions-to-a-if-then-ill-explain-help/116855/3 "2004-07-21T23:53:31Z")

</div>

Thank U So Much!
