# Need help in text scroll

**URL:** https://forum.kirupa.com/t/need-help-in-text-scroll/116788
**Category:** Uncategorized
**Created:** [July 21, 2004, 2:18pm UTC](https://forum.kirupa.com/t/need-help-in-text-scroll/116788 "2004-07-21T14:18:20Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![icube](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@icube](https://forum.kirupa.com/u/icube)
#### Post date: [July 21, 2004, 2:18pm UTC](https://forum.kirupa.com/t/need-help-in-text-scroll/116788/1 "2004-07-21T14:18:20Z")

</div>

i’m using [this tutorial](http://www.kirupa.com/developer/flash5/scrolltext.htm) to make my dynamic scroll text in flash mx… i din choose to use the inbuilt flash mx component because i wanted a custom one…

the thing is… how do i **click and hold** on my down/up button and the text continue scrollling…

i tried changing the tutorial code

```auto
on (press, release, keyPress "<Up>")

```

to

```auto
on (press)

```

and it doesn’t work…

please advice me what to do… thanks…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 21, 2004, 2:47pm UTC](https://forum.kirupa.com/t/need-help-in-text-scroll/116788/2 "2004-07-21T14:47:32Z")

</div>

I usually do mine similar to this. Put this code on the timeline and give your buttons the instance name of ‘up’ and ‘down’ and name your text box ‘textbox’

up.onPress = up.onDragOver = function() {  
pressing = true;  
movement = -1;  
};  
up.onRelease = up.onDragOut = function() {  
pressing = false;  
};  
down.onPress = down.onDragOver = function() {  
pressing = true;  
movement = 1;  
};  
down.onRelease = down.onDragOut = function() {  
pressing = false;  
};  
\_root.onEnterFrame = function() {  
if (pressing == true) {  
textbox.scroll = textbox.scroll+movement;  
}  
};

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 21, 2004, 3:34pm UTC](https://forum.kirupa.com/t/need-help-in-text-scroll/116788/3 "2004-07-21T15:34:25Z")

</div>

if you’re using a high frame rate…this would work better:

```auto

scrollUp = function () {
	contentText.scroll--;
};
scrollDown = function () {
	contentText.scroll++;
};
//down 
down.onPress = function() {
	scrollDown();
	scrollTextDown = setInterval(scrollDown, 100);

};
down.onRelease = down.onDragOut=function () {
	clearInterval(scrollTextDown);

};
//up
up.onPress = function() {
	scrollUp();
	scrollTextUp = setInterval(scrollUp, 100);
	
};
up.onRelease = up.onDragOut=function () {
	clearInterval(scrollTextUp);
	
};

```
