# Detect if arrived

**URL:** <https://forum.kirupa.com/t/detect-if-arrived/50918>\
**Category:** Uncategorized\
**Created:** [May 7, 2004, 6:25pm UTC](https://forum.kirupa.com/t/detect-if-arrived/50918 "2004-05-07T18:25:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sandman9](https://avatars.discourse-cdn.com/v4/letter/s/6a8cbe/32.png) [@Sandman9](https://forum.kirupa.com/u/Sandman9)\
**Post date:** [May 7, 2004, 6:25pm UTC](https://forum.kirupa.com/t/detect-if-arrived/50918/1 "2004-05-07T18:25:10Z")

</div>

I have the following movement script. How do I detect if this MC has reached the destination (aka 80)

```auto

onClipEvent (load) {
        top = 80;
}
onClipEvent (enterFrame) {
        cY = this._y;
        difY = cY-top;
        setProperty(this, _y, cY-(difY/5));
} 

```

You can’t say if top = 80 go to and play (whatever) because top is always going to equal 80. SO I thought if difY == 80 but that doesn’t work either …

Sandman9
