# Help

**URL:** https://forum.kirupa.com/t/help/14510
**Category:** Uncategorized
**Created:** [February 27, 2003, 4:19am UTC](https://forum.kirupa.com/t/help/14510 "2003-02-27T04:19:35Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![invisible7](https://avatars.discourse-cdn.com/v4/letter/i/779978/32.png) [@invisible7](https://forum.kirupa.com/u/invisible7)
#### Post date: [February 27, 2003, 4:19am UTC](https://forum.kirupa.com/t/help/14510/1 "2003-02-27T04:19:35Z")

</div>

I have a topbar image that changes color based on the mouse position in the fla. The code someone gave me works, but everywhere in the fla. I only want the topbar image to play when the mouse moves hor. across a menu bar).

this is what i’m using.

onClipEvent(load){  
gotoAndStop(1);  
}

onClipEvent(enterFrame){  
goto = Math.round(\_root.\_xmouse/10);

gotoAndStop(goto);  
}

The topbar is a mc with the color change keyframed over 60 frames.

someone suggested

if (\_root.\_xmouse \>= 10 || \_root.\_xmouse \<= 100) {  
// any movieClip action you want  
}

I don’t have any idea how to incorperate this code into my original code. Also, what do the numbers mean associated with mouse position.  
i.e. (\_xmouse \>= 10)

thanks for any help

---

<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 27, 2003, 7:23am UTC](https://forum.kirupa.com/t/help/14510/2 "2003-02-27T07:23:00Z")

</div>

first i would say change the **|| [size=1]logical or[/size]** operator to **&& [size=1]short-circuit AND[/size]** operator

if (\_root.\_xmouse \>= 10 **||** \_root.\_xmouse \<= 100) {  
if (\_root.\_xmouse \>= 10 **&&** \_root.\_xmouse \<= 100) {

then i guess it would be something like this:

```auto
onClipEvent (enterFrame) {
	if (_root._xmouse >= 10 && _root._xmouse <= 100) {
		goto = Math.round(_root._xmouse/10);
		this.gotoAndStop(goto);
	}
}

```

or

```auto
onClipEvent (enterFrame) {
	if (_root.menubarInstanceName.hitTest(_root._xmouse, _root._ymouse, true)) {
		goto = Math.round(_root._xmouse/10);
		this.gotoAndStop(goto);
	}
}

```

by the way …  
[color=red]\<=[/color] less than or equal to  
[color=red]\>=[/color] greater than or equal to

hope it helps 🙂

---

<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 27, 2003, 1:40pm UTC](https://forum.kirupa.com/t/help/14510/3 "2003-02-27T13:40:54Z")

</div>

that was very helpful and clear. thanks.

my only question are the numbers associated with mouse position like \_xmouse = 10 etc. Is 10 a pixle position???

thanks
