|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Customized dyanmically gathered text scroller problem....
I've made my own buttons to control the scrolling of a text field, they work like this (for the down button, the up button is very similar):
Frame 1 actionscript: Code:
loadVariablesNum("news_flash.php", 0);
stop();
Frame 2 actionscript: Code:
if (scrolltext.scroll<scrolltext.maxscroll) {
scrolltext.scroll++;
} else {
gotoAndStop(1);
}
Frame 3 actionscript: Code:
gotoAndPlay(2); Down button actionscript: Code:
on (rollOver) {
gotoAndPlay(2);
}
on (rollOut) {
gotoAndStop(1);
}
Now it works fine enough (not as I wanted it, because I couldn't figure some things out) but its not the smoothest of movements and I'd like to increase the speed. Is there anyway to do that? I've followed how people have set up scrollers which work really smoothly, but they all use motion tweens for the scrolling action on static text. Is there anyway to create something like this with my dynamic text, I've tried it but it just moves the text box... is there a way I can force the text box to show all the dynamic text. I.e. 1. Force the text box to show all the dynamic text. 2. to scroll down check to see if text box bottom is outside the movie bottom (I don't need any masking or anything for this movie) if so scroll it up (while rollover). 3. to scroll up as above but in reverse. Any help would be greatly appreciated. -D Last edited by DEfusion : July 1st, 2003 at 06:09 AM. |
|
#2
|
|||
|
|||
|
to scroll faster change the line that increments scroll to
scrolltext.scroll+=5;//or whatever to see if your text is bigger than the textfield, use scrolltext.bottomScroll < scrolltext.maxscroll |
|
#3
|
|||
|
|||
|
Ok thanks for that. I know already that there is more text than will fit into the text field, but is there anyway to force the size of text field to expand (vertically only) so that it then fits all the text in - that way I know I can have the smoother scroller that I desire.
Thanks again. -D |
|
#4
|
|||
|
|||
|
if it fits all the text in, why do you need a scroller? you can just set the _height property to change its size.
|
|
#5
|
|||
|
|||
|
Ok there is always going to be more text than the height of the text box, thats why I need a scroller... the movie itself is only 150px high, thats why I need a scroller.
Is there anyway to get the height of the text in the text box (maybe by using scrolltext.maxscroll ) to set the _height of the text box? -D |
|
#6
|
|||
|
|||
|
well this will depend on the font size you're using - that will determine how many pixels a line takes up - so you will need to experiment. say you start out by assuming your characters take up 10px:
Code:
char_height = 10; scrolltext._height = char_height*scrolltext.maxscroll; |
|
#7
|
|||
|
|||
|
Ok I'll have a play around.
Thanks again. -D |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > FlashMX database text problem... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|