# Mouse wheel function

**URL:** <https://forum.kirupa.com/t/mouse-wheel-function/281626>\
**Category:** flash\
**Created:** [February 11, 2009, 1:48pm UTC](https://forum.kirupa.com/t/mouse-wheel-function/281626 "2009-02-11T13:48:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmatzen](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@mmatzen](https://forum.kirupa.com/u/mmatzen)\
**Post date:** [February 11, 2009, 1:48pm UTC](https://forum.kirupa.com/t/mouse-wheel-function/281626/1 "2009-02-11T13:48:26Z")

</div>

Hello,  
I have everything working great in my mouse wheel function for a text box except for one thing. I am trying to write an if statement that calls to the function only if my mouse is at a certin x/y cord. I can get it to work using one cord for examp:

```auto

if(_xmouse >= 0 == true)
{
        dragger._y -= (delta*mousewheelSpeed);
}

```

or

```auto

if(_ymouse >= 240 == true)
{
        dragger._y -= (delta*mousewheelSpeed);
}

```

how do i say both?

Thank you
