# Little AS quesiton with scroll text

**URL:** <https://forum.kirupa.com/t/little-as-quesiton-with-scroll-text/8622>\
**Category:** Uncategorized\
**Created:** [November 25, 2002, 9:32am UTC](https://forum.kirupa.com/t/little-as-quesiton-with-scroll-text/8622 "2002-11-25T09:32:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![blah\_de\_blah](https://avatars.discourse-cdn.com/v4/letter/b/a8b319/32.png) [@blah\_de\_blah](https://forum.kirupa.com/u/blah_de_blah)\
**Post date:** [November 25, 2002, 9:32am UTC](https://forum.kirupa.com/t/little-as-quesiton-with-scroll-text/8622/1 "2002-11-25T09:32:27Z")

</div>

i was reading this tutorial  
[http://www.kirupa.com/developer/flash5/scrolltext.asp](http://www.kirupa.com/developer/flash5/scrolltext.asp)  
and the AS it gives me for the up and down buttons seems to only work in flash 5. The up button AS it gives is:

on (press, release, keyPress “\<Up\>”) {  
currentScroll = scrollableText.scroll;  
if (Number(currentScroll)\>1) {  
scrollableText.scroll = currentScroll-1;  
}  
}

and the down is:

on (press, release, keyPress “\<Down\>”) {  
currentScroll = scrollableText.scroll;  
if (Number(currentScroll)\<Number(scrollableText.maxscroll)) {  
scrollableText.scroll = Number(currentScroll)+1;  
}  
}

what would these be in flash mx? thx

---

<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:** [November 25, 2002, 9:45am UTC](https://forum.kirupa.com/t/little-as-quesiton-with-scroll-text/8622/2 "2002-11-25T09:45:13Z")

</div>

I’m using MX and that tutorial works just fine. Let me look at your fla, maybe I can fix it for you.

---

<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:** [November 25, 2002, 9:53am UTC](https://forum.kirupa.com/t/little-as-quesiton-with-scroll-text/8622/3 "2002-11-25T09:53:26Z")

</div>

ah yea you’re right it does i downloaded the final thing from the tutorial and compared it with mine and figured what was wrong…thx anwyaz…  
but i was wondering, if the color of the text box thing can be changed…would you happen to know how? or would you just have to put somethin behind it so it looks like the text box is that color?

---

<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:** [November 25, 2002, 9:57am UTC](https://forum.kirupa.com/t/little-as-quesiton-with-scroll-text/8622/4 "2002-11-25T09:57:10Z")

</div>

oh yea one more thing…i was wondering what this line:

scrollableText.scroll = currentScroll-1;

and

scrollableText.scroll = Number(currentScroll)+1;

meant…i guess they mean nearly the same thing. i was just wondering so in the future if i ever come across anythin it would help thx :nerd:

---

<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:** [November 25, 2002, 9:13pm UTC](https://forum.kirupa.com/t/little-as-quesiton-with-scroll-text/8622/5 "2002-11-25T21:13:08Z")

</div>

Honestly I’m new to AS so I’m not sure what it means, but I think one makes it scroll up and one makes it scroll down, not sure though. And if you wanna change the background of the box then just put something behind it or double click on the background symbol that kirupa used and just change the green to whatever color you like. =)

---

<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:** [November 26, 2002, 9:37am UTC](https://forum.kirupa.com/t/little-as-quesiton-with-scroll-text/8622/6 "2002-11-26T09:37:32Z")

</div>

alritey thx 🙂

---

<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:** [November 26, 2002, 5:04pm UTC](https://forum.kirupa.com/t/little-as-quesiton-with-scroll-text/8622/7 "2002-11-26T17:04:09Z")

</div>

> \*Originally posted by blah-de-blah \*  
> \*\*oh yea one more thing…i was wondering what this line:

scrollableText.scroll = currentScroll-1;

and

scrollableText.scroll = Number(currentScroll)+1;

meant…i guess they mean nearly the same thing. i was just wondering so in the future if i ever come across anythin it would help thx :nerd: \*\*

scrollableText.scroll = currentScroll-1;

This means current scroll - 1 pixel and since it is attached to the up button it moves the text UP

scrollableText.scroll = Number(currentScroll)+1;

basically the opposite it moves the text DOWN 1 pixel and obviously you must attach it to DOWN button…maybe i dont explain well if you still dont get it just ask =)

---

<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:** [November 26, 2002, 5:24pm UTC](https://forum.kirupa.com/t/little-as-quesiton-with-scroll-text/8622/8 "2002-11-26T17:24:34Z")

</div>

> This means current scroll - 1 pixel

Actually, since you are dealing with a text box, it scrolls one **line** , 😛 not 1 pixel. In most other cases when you add 1 or subract 1, you are just changing the value by one pixel.
