all groups > flash actionscript > december 2006 >
You're in the

flash actionscript

group:

Text Scroll Speed



Text Scroll Speed JamieATL
12/28/2006 10:29:11 PM
flash actionscript: I'm using the "scroll" property with a couple of onPress events to fluidly
scroll text up or down in a dynamic text field. For example:

myTextField.scroll += 1;

It seems that there's no way to reduce the speed of the scroll below "1,"
which is relatively fast for most font sizes. I understand the increment (1 and
up) is moving that many lines of text, but am surprised that ActionScript
doesn't seem to allow incrementing by a half or a quarter line (.5 or .25,
respectively), since AS mostly speaks in pixels.

Without creating a custom class or writing a bunch of AS, is there a simple
way to slow down the scroll speed while still using the "scroll" property (and
not coding this the old fashioned way with masks and _y actions)? Seems odd
that the "scroll" property would be introduced to alleviate lots of
programming, and then fail to include better control for speed. I'm assuming
I'm just missing something...
Re: Text Scroll Speed shikozel
12/28/2006 11:00:45 PM
Re: Text Scroll Speed JamieATL
12/28/2006 11:05:12 PM
Re: Text Scroll Speed kglad
12/28/2006 11:24:07 PM
Re: Text Scroll Speed JamieATL
12/29/2006 12:57:07 AM
Thanks, kglad. Just don't understand why they put so much functionality into
that property but tied it to lines of text rather than pixels. Too bad we don't
have both options. Anyway, I replaced my up/down buttons with a dragable
shuttle that controls the scroll property of the textfirled. It's smoother and
easier to control, anyway...
Re: Text Scroll Speed kglad
12/29/2006 1:49:39 AM
you can do pixel by pixel scrolling, but not using the scroll property of
textfields.

if you make your textfield a child of a movieclip, then you can do pixel by
pixel "scrolling" (really adjusting the _y or sometimes _x property) of the
parent movieclip. this technique also allows easing.
AddThis Social Bookmark Button