Code archives/Algorithms/Sinus scroller
This code has been declared by its author to be Public Domain code.
Download source code
| |||||
A simple sinusscroller | |||||
Graphics 800,600 SetBuffer BackBuffer() Repeat Cls x=MilliSecs()/10.0 Mod 800 SinScroll("A nice sinus scroller, just a small example how this can be done :)",800-x,300,MilliSecs()/5.0) SinScroll("A nice sinus scroller, just a small example how this can be done :)",800-x-800,300,MilliSecs()/5.0) Flip Until KeyDown(1) End Function SinScroll(txt$,x,y,am,amp=25,per=20,d=10) For n=1 To Len(txt$) Text x+xx,y+Sin(am+n*per)*amp,Mid$(txt$,n,1) xx=xx+d Next End Function |
Comments
None.
Code Archives Forum