Scrolling text -- like movie credits
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 931
- Joined: Thu Nov 13, 2008 6:48 am
- Location: London, UK
Scrolling text -- like movie credits
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
Thanks
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS
Targets: Mac, iOS
-
- Livecode Opensource Backer
- Posts: 9359
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Scrolling text -- like movie credits
Presumably you mean vertically UP a blank card?vertically across a blank card
-
- VIP Livecode Opensource Backer
- Posts: 9824
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Scrolling text -- like movie credits
The scroll of a field can still be set even if the scrollbar properties are turned off.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Livecode Opensource Backer
- Posts: 9359
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
-
- Livecode Opensource Backer
- Posts: 9359
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Scrolling text -- like movie credits
This one does exactly the same but with a text field, and comes in at less than 1%
of the size of the former.
Rocket science.
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
- Attachments
-
- Scrolling Text 2.livecode.zip
- Here's the stack.
- (2.64 KiB) Downloaded 169 times
-
- VIP Livecode Opensource Backer
- Posts: 9648
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Scrolling text -- like movie credits
A little more compact:
Craig
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
-
- Livecode Opensource Backer
- Posts: 9359
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Scrolling text -- like movie credits
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
- Attachments
-
- Scrolling Text 3.livecode.zip
- Here's the stack.
- (3.1 KiB) Downloaded 170 times
-
- VIP Livecode Opensource Backer
- Posts: 9648
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Scrolling text -- like movie credits
That is adorable, Richmond.
Craig
Craig
-
- Livecode Opensource Backer
- Posts: 9359
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Scrolling text -- like movie credits
It might be if it weren't so jerky.That is adorable,
-
- VIP Livecode Opensource Backer
- Posts: 9648
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Scrolling text -- like movie credits
Ah.
Craig
I didn't actually run it. Lets play around for a bit...It might be if it weren't so jerky.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9648
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Scrolling text -- like movie credits
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
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
Last edited by dunbarx on Wed Nov 25, 2020 5:37 pm, edited 1 time in total.
-
- Livecode Opensource Backer
- Posts: 9359
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Scrolling text -- like movie credits
- -Want to try this?
No!
Busy building bookshelves.
Strewth! Give me strength.a stack of fields
-
- VIP Livecode Opensource Backer
- Posts: 9648
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Scrolling text -- like movie credits
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
I think scrolling is required. Just trying to smooth it with all the other shenanigans going on.
Craig
-
- Livecode Opensource Backer
- Posts: 9359
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Scrolling text -- like movie credits
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.
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.
-
- VIP Livecode Opensource Backer
- Posts: 7229
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Scrolling text -- like movie credits
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".
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com