home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Boot Disc 5
/
boot-disc-1997-01.iso
/
media
/
utility.cst
/
00018_Script_BannerClass
< prev
next >
Wrap
Text File
|
1996-11-05
|
1KB
|
50 lines
property charindex,sourcestr,targetstr,targetfield,ancestor,numchars,mode
on new me,mysource,mytargetfield,mymode,mynumchars
set ancestor=new(script "GenericClass")
set sourcestr=mysource
if voidP(mymode) then
set mode=#center
else
set mode=mymode
end if
set numchars=mynumchars
set targetfield=mytargetfield
set targetstr=""
set startindex=0
set charindex=0
clearactorlist me,"BannerClass",#targetfield
add the actorlist,me
return me
end
on stepframe me
case mode of
#center:
set charindex=charindex+1
if charindex>length(sourcestr) then
set charindex=0
set targetstr=""
else
set targetstr=targetstr&(char charindex of sourcestr)
set the text of member targetfield to targetstr
end if
#scroll:
set charindex=(charindex mod length(sourcestr))+1
if length(targetstr)<numchars then
set targetstr=targetstr&(char charindex of sourcestr)
else
delete char 1 of targetstr
set targetstr=targetstr&(char charindex of sourcestr)
end if
set the text of member targetfield to targetstr
end case
end
on dispose me
set the text of member targetfield to " "
clearactorlist me,"BannerClass",#targetfield
return 0
end