# Got a new problem and it is common

**URL:** https://forum.kirupa.com/t/got-a-new-problem-and-it-is-common/181044
**Category:** Uncategorized
**Created:** [March 6, 2006, 12:42am UTC](https://forum.kirupa.com/t/got-a-new-problem-and-it-is-common/181044 "2006-03-06T00:42:42Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dayglowdave](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@dayglowdave](https://forum.kirupa.com/u/dayglowdave)
#### Post date: [March 6, 2006, 12:42am UTC](https://forum.kirupa.com/t/got-a-new-problem-and-it-is-common/181044/1 "2006-03-06T00:42:42Z")

</div>

before anyone tells me that there is a tutorial for this on here hear me out. I’m not interesed in using a component.

I used:

```auto

this.createTextField("myText", this.getNextHighestDepth(), 20, 20, 100, 200);
with(myText){
    type = "dynamic";
    selectable = true;
    html = true;
    wordWrap = true;
    multiline = true;
    htmlText = "some text here";
}

```

then I created 2 buttons one for scrolling ‘myText’ up and one for scrolling down. Then on the button I placed this:

```auto

on(press){
    if(_root.myText.scroll < _root.myText.maxscroll){
    scrollthis = function(){ 
    _root.myText.scroll += 10; //speed of scroll
    }
    }

_root.myText.onEnterFrame = scrollthis(); //trying to get the scroll to be continuous so you don't have to keep clicking the mouse >:E
}

```

I have tried a million different ways to write the code and so far have only succeeded in arriving at the undesired result a million different ways. How the hell does one write this so that ‘myText’ scrolls continuously at a set speed when the user clicks and holds on the up or down button?

any help would be much appreciated 🙂
