Page 1 of 5

Scrolling text -- like movie credits

Posted: Tue Nov 24, 2020 5:00 pm
by marksmithhfx
Anyone have a suggestion for scrolling a list of text items (like movie credits) vertically across a blank card... ok, I suppose I'll need a container but haven't decided if one is better than another. I'd probably want it to be invisible anyway (no borders etc).

Thanks

Re: Scrolling text -- like movie credits

Posted: Tue Nov 24, 2020 5:49 pm
by richmond62
vertically across a blank card
Presumably you mean vertically UP a blank card?

Re: Scrolling text -- like movie credits

Posted: Tue Nov 24, 2020 6:02 pm
by FourthWorld
The scroll of a field can still be set even if the scrollbar properties are turned off.

Re: Scrolling text -- like movie credits

Posted: Tue Nov 24, 2020 8:07 pm
by richmond62
scroll1.jpg
-
This one "scrolls" an image of text/

https://www.dropbox.com/s/63d2bsw2sz2o9 ... e.zip?dl=0

Re: Scrolling text -- like movie credits

Posted: Tue Nov 24, 2020 8:17 pm
by richmond62
This one does exactly the same but with a text field, and comes in at less than 1%
of the size of the former.

Code: Select all

on mouseUp
   set the top of fld "REP" to 10
   put the bottom of fld "REP" into BUM
   repeat until BUM < 1
      set the bottom of fld "REP" to BUM
      subtract 1 from BUM
      wait 2 ticks
   end repeat
end mouseUp
Rocket science. 8)

Re: Scrolling text -- like movie credits

Posted: Tue Nov 24, 2020 9:37 pm
by dunbarx
A little more compact:

Code: Select all

on mouseUp
   repeat until the scroll of fld 1 >=  (the number of lines of fld 1 * the textHeight of fld 1)  - the height of fld 1
      set the scroll of fld 1 to the scroll of fld 1 + 1
      wait 1 millisec --your call here
   end repeat
end mouseUp
Craig

Re: Scrolling text -- like movie credits

Posted: Wed Nov 25, 2020 2:39 pm
by richmond62
scrollBonkers.jpg
-
Had some wild dreams last night.

Code: Select all

on mouseUp
   put fld "REP2" into fld "REP"
   do rowSCALE
   put 1 into WIPEOUT
   repeat until WIPEOUT > 50
      delete line 1 of fld "REP"
      do rowSCALE
      add 1 to WIPEOUT
      --wait 1 tick
   end repeat
end mouseUp

on rowSCALE
put 1 into RROW
repeat until RROW > 50
   set the textSize of line RROW of fld "REP" to (RROW + 7)
   add 1 to RROW
end repeat
end rowSCALE
Disclaimer: George Lucas was not involved in the making of this stack in any way whatsoever. 8)

Re: Scrolling text -- like movie credits

Posted: Wed Nov 25, 2020 2:59 pm
by dunbarx
That is adorable, Richmond. :D

Craig

Re: Scrolling text -- like movie credits

Posted: Wed Nov 25, 2020 3:03 pm
by richmond62
That is adorable,
It might be if it weren't so jerky.

Re: Scrolling text -- like movie credits

Posted: Wed Nov 25, 2020 4:38 pm
by dunbarx
Ah.
It might be if it weren't so jerky.
I didn't actually run it. Lets play around for a bit...

Craig

Re: Scrolling text -- like movie credits

Posted: Wed Nov 25, 2020 5:17 pm
by dunbarx
Richmond.

Tried a few experiments.

There is an intrinsic problem with doing this in a single field, in that If I set the "fixedLineHeight" to true, or set the textSize of a particular line, LC adjusts the visible text to accommodate those property changes. This always appears as jerkiness, whether I then scroll the field or whatever.

Thinking...

Craig

Re: Scrolling text -- like movie credits

Posted: Wed Nov 25, 2020 5:23 pm
by richmond62
Want to try this?
-
BIB.jpg
-
No!

Busy building bookshelves. 8)
a stack of fields
Strewth! Give me strength.

Re: Scrolling text -- like movie credits

Posted: Wed Nov 25, 2020 5:40 pm
by dunbarx
I had thought of a stack of fields, each with its own text properties, and loaded field by field (line by line) from below with the contents of some source text. Not sure this would be any smoother.

I think scrolling is required. Just trying to smooth it with all the other shenanigans going on.

Craig

Re: Scrolling text -- like movie credits

Posted: Wed Nov 25, 2020 5:45 pm
by richmond62
Those bookshelves seem to get more and more %^&*()
the higher I climb on the ladder, but it is in fact an illusion as the tape measure
rarely lies.

AND, should you think that that has no relevance to the matter under consideration, think again. 8)

Re: Scrolling text -- like movie credits

Posted: Wed Nov 25, 2020 5:53 pm
by jacque
Just butting in to remark that all solutions so far will lock up the CPU until the repeat completes. Add a "with messages" or, better, use "send in time".