# Scrolling Text

**URL:** https://forum.kirupa.com/t/scrolling-text/166665
**Category:** Uncategorized
**Created:** [October 21, 2005, 5:59pm UTC](https://forum.kirupa.com/t/scrolling-text/166665 "2005-10-21T17:59:35Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![haam](https://avatars.discourse-cdn.com/v4/letter/h/a698b9/32.png) [@haam](https://forum.kirupa.com/u/haam)
#### Post date: [October 21, 2005, 5:59pm UTC](https://forum.kirupa.com/t/scrolling-text/166665/1 "2005-10-21T17:59:35Z")

</div>

Alright, I’ve got it scrolling - now how do I make it stop???

The code on the buttons:

```auto
on(rollOver){
this.onEnterFrame = function(scrollup){
this.text_mc._y = this.text_mc._y - 10;
}
}
on(rollOut){
delete this.onEnterFrame;
}

```

I want to make the text stop scrolling when it gets to certain points, i.e. the bottom of the text and the top of the text.

I imagine it’s an if statement. I tried one where i created a variable to get the \_y property of the text\_mc and told it to delete the scrolling function if the variable == a certain \_y number. But it didn’t work, either the code was just wrong and i don’t know what i’m doing or it didn’t recognise the function.

Anyone can help?
