Scrolling text -- like movie credits

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10317
Joined: Wed May 06, 2009 2:28 pm

Re: Scrolling text -- like movie credits

Post by dunbarx » Wed Nov 25, 2020 6:26 pm

Jacque.

Our current issues are that we are jerks.

Craig

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Scrolling text -- like movie credits

Post by Klaus » Wed Nov 25, 2020 6:46 pm

If you want a smooth "Star Wars" like credit scene, check Hermanns excellent stack here:
viewtopic.php?f=93&t=29018&p=161032&hil ... rs#p161032

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7391
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Scrolling text -- like movie credits

Post by jacque » Wed Nov 25, 2020 7:48 pm

dunbarx wrote:
Wed Nov 25, 2020 6:26 pm
Jacque.

Our current issues are that we are jerks.

Craig
Heh. :) Well in that case we should send you in time too.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10317
Joined: Wed May 06, 2009 2:28 pm

Re: Scrolling text -- like movie credits

Post by dunbarx » Thu Nov 26, 2020 4:50 am

Jacque.

But I don't handle messages well.

A Kludge and a half would be to create and load thin transparent horizontal fields at the bottom of a defined area that move upward at some nice rate, and reduce their textSize along the way. The height of each field has to diminish as well so that the spacing seems "right". They are deleted at the top. I am sure this would be smooth, and look exactly like a field with that dynamic attribute.

But it is a heavy kludge, and though simple to build, I am sticking for the moment on how to make a single field do it.

Craig

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am

Re: Scrolling text -- like movie credits

Post by marksmithhfx » Thu Nov 26, 2020 5:31 pm

richmond62 wrote:
Tue Nov 24, 2020 5:49 pm
vertically across a blank card
Presumably you mean vertically UP a blank card?
Correct, across can be up :)
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am

Re: Scrolling text -- like movie credits

Post by marksmithhfx » Thu Nov 26, 2020 5:37 pm

richmond62 wrote:
Wed Nov 25, 2020 5:45 pm
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)
Lol -- you guys are two funny. Anyway, on your first example, very clever but it locked up my computer. I had to force quit to get it to listen to me :lol:
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am

Re: Scrolling text -- like movie credits

Post by marksmithhfx » Thu Nov 26, 2020 5:39 pm

dunbarx wrote:
Wed Nov 25, 2020 6:26 pm
Jacque.

Our current issues are that we are jerks.

Craig
Waaaaaaahhhhh 😂
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am

Re: Scrolling text -- like movie credits

Post by marksmithhfx » Thu Nov 26, 2020 5:42 pm

dunbarx wrote:
Thu Nov 26, 2020 4:50 am
Jacque.

But I don't handle messages well.

A Kludge and a half would be to create and load thin transparent horizontal fields at the bottom of a defined area that move upward at some nice rate, and reduce their textSize along the way. The height of each field has to diminish as well so that the spacing seems "right". They are deleted at the top. I am sure this would be smooth, and look exactly like a field with that dynamic attribute.

But it is a heavy kludge, and though simple to build, I am sticking for the moment on how to make a single field do it.

Craig
Please do. Bottom to top works fine. I don't need the 3d effect. Winner gets a free copy of the program (probably saving you, ohhh, maybe $2.99) :lol:
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Scrolling text -- like movie credits

Post by Klaus » Thu Nov 26, 2020 6:10 pm

Did you take a look at Hermann's stack?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7391
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Scrolling text -- like movie credits

Post by jacque » Thu Nov 26, 2020 7:16 pm

marksmithhfx wrote:
Lol -- you guys are two funny. Anyway, on your first example, very clever but it locked up my computer. I had to force quit to get it to listen to me :lol:
That's due to the repeat loops I mentioned. I bet if you watch the Activity Monitor you'll see that LC is using 100% CPU time and all other apps are frozen.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7391
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Scrolling text -- like movie credits

Post by jacque » Thu Nov 26, 2020 7:34 pm

Bottom to top works fine. I don't need the 3d effect.
All you really need is a field containing the text, spaced and styled however you want. Leave some blank lines between each credit and enough blank lines at the bottom to push all the text out of view. Then (untested):

Code: Select all

on startScroll
  doScroll
end startScroll

on doScroll
  set the scroll of fld "credits" to the scroll of fld "credits" + 2
  send "doScroll" to me in 10 milliseconds
end doScroll
Adjust the scroll amount and the time delay until it looks right. You should provide an exit clause too if the user wants to stop or leave the card. Delete all pending messages to stop.

Code: Select all

on stopScroll
  repeat for each line L in the pendingMessages 
    if L contains "doScroll" then cancel item 1 of L
  end repeat 
end stopScroll
Last edited by jacque on Fri Nov 27, 2020 11:00 pm, edited 1 time in total.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am

Re: Scrolling text -- like movie credits

Post by marksmithhfx » Fri Nov 27, 2020 10:40 am

Klaus wrote:
Thu Nov 26, 2020 6:10 pm
Did you take a look at Hermann's stack?
No, I missed it the first time. Going to look at it now...

Cheers,
Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

SparkOut
Posts: 2946
Joined: Sun Sep 23, 2007 4:58 pm

Re: Scrolling text -- like movie credits

Post by SparkOut » Fri Nov 27, 2020 10:52 am

I think Hermann's stack is gone now.
But here's another version based on use of browser widget, using css taken from here: https://codepen.io/yukulele/pen/KsCIi
It scrolls very smoothly.
Credits scroller.zip
(8.55 KiB) Downloaded 209 times
Star Wars Crawl in Browser widget.png

Other browser tricks for alternate versions (including Yukulélé's) are here: https://css-tricks.com/snippets/css/sta ... rawl-text/

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: Scrolling text -- like movie credits

Post by richmond62 » Fri Nov 27, 2020 11:11 am

Lol -- you guys are two funny.
(sic)
-
BIBLIOT2.jpg
-
A rather subjective statement. 8)

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am

Re: Scrolling text -- like movie credits

Post by marksmithhfx » Fri Nov 27, 2020 12:19 pm

SparkOut wrote:
Fri Nov 27, 2020 10:52 am
I think Hermann's stack is gone now.
But here's another version based on use of browser widget, using css taken from here: https://codepen.io/yukulele/pen/KsCIi
It scrolls very smoothly.
Impressive indeed!
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

Post Reply