Got a new problem and it is common

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:



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:



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 :slight_smile: