LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Fri Jan 11, 2002 7:26 pm Post subject: Horizontally Scroll Text |
|
|
This script scrolls text horizontally
| Code: |
dialog create,dummy,0,0,0,0
dialog CREATE,Scroll,-1,0,252,74
dialog add,status,s1
dialog ADD,TEXT,text1,16,38,163,13,The text below should be scrolling.
dialog SHOW
%%orig = -------------------- http://www.CGingerich.cc --------------------
%%text = %%orig
%t = @pred(@len(%%orig))
%%len = %t
gosub space
%%text2 = %f@substr(%%text,1,1)
:evloop
wait event,.1
goto @event()
:Timer
if %%text
%%text = @substr(%%text,2,@len(%%text))
else
%t = @pred(%%len)
if @greater(%t,0)
gosub space
%%len = %t
%%text2 = %f@substr(%%orig,1,@diff(@len(%%orig),%%len))
else
%t = @pred(@len(%%orig))
%%len = %t
gosub space
%%text2 = %f@substr(%%text,1,1)
%%text = %%orig
end
end
if %%text
dialog set,s1,%%text
else
dialog set,s1,%%text2
end
goto evloop
:close
stop
:Space
%i = " "
%f =
repeat
%f = %F%i
until @equal(@len(%F),%t)
exit
|
_________________ Chris
Http://theblindhouse.com |
|