home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Invenzioni E Inventori 1: Lavoro E Vita Quotidiana
/
invenzioni-inventori-1.iso
/
mac
/
Invenzio
/
CREDITS.DIR
/
00014_Script_14
< prev
next >
Wrap
Text File
|
1997-09-27
|
4KB
|
128 lines
on crd_collega
set rcast to the mousecast
set nparola to the mouseword
set qcar to the mousechar
set rcast to 10
set a to the textstyle of char qcar of field rcast
set stile to a
controlla qcar
if a="underline,italic" or (a="italic,underline") then
set a to "underline"
end if
if a = "underline" then
if the last char of word nparola of field rcast = "," and the last char of word nparola-1 of field rcast = "," then
mostrat stile, pulisci (word nparola of field rcast)
exit
end if
if the last char of word nparola of field rcast = "," and the textstyle of word nparola-1 of field rcast = "plain" then
mostrat stile, pulisci (word nparola of field rcast)
exit
end if
if the last char of word nparola-1 of field rcast = "," and the textstyle of word nparola+1 of field rcast = "plain" then
mostrat stile, pulisci (word nparola of field rcast)
exit
end if
if qcar > 1 then
set inizio to qcar
set a to the textstyle of char (inizio-1) of field rcast
repeat while a=stile and inizio>0 and validChar(char (inizio-1) of field rcast)
set inizio to inizio-1
set a to the textstyle of char (inizio-1) of field rcast
end repeat
end if
set nchars to the number of chars in field rcast
if qcar < nchars then
set fine to qcar
set a to the textstyle of char (fine+1) of field rcast
repeat while a=stile and fine<nchars and validChar(char (fine+1) of field rcast)
set fine to fine+1
set a to the textstyle of char (fine+1) of field rcast
end repeat
end if
if voidp (inizio) then set inizio to qcar
if voidp (fine) then set fine to qcar
set frase to char inizio to fine of field rcast
-- if nparola > 1 then
-- set inizio to nparola
-- set a to the textstyle of word (inizio-1) of field rcast
-- repeat while a = stile and (inizio >0 )
-- set inizio to inizio-1
-- set a to the textstyle of word (inizio-1) of field rcast
-- end repeat
-- end if
-- if nparola< the number of words in field rcast then
-- set fine to nparola
-- set a to the textstyle of word (fine+1) of field rcast
-- repeat while a = stile and (fine < the number of words in field rcast )
-- set fine to fine+1
-- set a to the textstyle of word (fine+1) of field rcast
-- end repeat
-- end if
-- if voidp (inizio) then set inizio to nparola
-- if voidp (fine) then set fine to nparola
-- set frase to word inizio to fine of field rcast
put frase,inizio,fine
mostrat stile, cleanSpace (frase)
else
set the visible of sprite 6 to false
set the visible of sprite 7 to false
set the visible of sprite 8 to false
set the visible of sprite 9 to false
end if
end
--------------------------------------------------------------------------------------
on validChar chr
if chr="," OR chr="." Or chr=";" OR chr="(" OR chr=")" then return false
return true
end
--------------------------------------------------------------------------------------
on cleanSpace cosa
repeat while char 1 of cosa=" "
delete char 1 of cosa
end repeat
set n to the length of cosa
repeat while char n of cosa=" "
delete char n of cosa
set n to n-1
end repeat
return cosa
end
--------------------------------------------------------------------------------------
ON MOSTRAT STILE,FRASE
if stile = "underline" then
put frase
set credit_cast to 19
global credit_cast,credit_MaxScroll
set credit_linea to 1
set credit_cast to biografia (frase)
put credit_cast
set the visible of sprite 6 to true
updatestage
set the visible of sprite 9 to true
if credit_cast=65 then
global credit_maxscroll,credit_linea
set credit_linea to 1
set credit_maxscroll to (the number of lines of field 65) - 16
set the visible of sprite 7 to true
set the visible of sprite 8 to true
credit_show
updatestage
else
set the visible of sprite 7 to false
set the visible of sprite 8 to false
duplicate cast credit_cast,200
updatestage
end if
end if
end