# Stop scrolling

**URL:** https://forum.kirupa.com/t/stop-scrolling/216305
**Category:** Uncategorized
**Created:** [February 15, 2007, 9:41am UTC](https://forum.kirupa.com/t/stop-scrolling/216305 "2007-02-15T09:41:50Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![laudato](https://avatars.discourse-cdn.com/v4/letter/l/96bed5/32.png) [@laudato](https://forum.kirupa.com/u/laudato)
#### Post date: [February 15, 2007, 9:41am UTC](https://forum.kirupa.com/t/stop-scrolling/216305/1 "2007-02-15T09:41:50Z")

</div>

hello.

i have a text which scrolls automatically. the problem is that i want to use onRollOver and onRollOut to stop/start scroll.

```auto
myVars = new LoadVars();
myVars.onLoad = function() {
    txt_prvi.htmlText = this.txt_prvi;
    txt_prvi.html = true;
    sirina_ = txt_prvi.textHeight;
    // sirina texta ti je onda
    visina_ = txt_prvi.textHeight;
    duplicateMovieClip("txt_prvi", "txt_drugi", this.getNextHighestDepth());
        txt_drugi.html = true;
    txt_drugi.htmlText = txt_prvi.htmlText;
    // postavis drugi text pored prvog i pomeris za jedno 5 px
    txt_drugi._y = txt_prvi._y+visina_+50;
    txt_drugi._x = txt_prvi._x;
    // skrolujes na onEnterFrame
    onEnterFrame = function () {
        txt_prvi._y -= 0.5;
        txt_drugi._y -= 0.5;
        if ((txt_prvi._y+sirina_)<0) {
            // ako je tekst ispao iz neke granice na primer 0 
            txt_prvi._y = txt_drugi._y-1;
            //
            txt_drugi._y = txt_prvi._y+visina_+50;
        }
    };
};
myVars.load(file);

```

but it ignores when i try to make function which would change scroll amount to zero. i must stop scrolling in code above, right?

thank you
