home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Invenzioni E Inventori 1: Lavoro E Vita Quotidiana
/
invenzioni-inventori-1.iso
/
mac
/
Invenzio
/
index.dir
/
00062_Script_62
< prev
next >
Wrap
Text File
|
1997-10-15
|
7KB
|
198 lines
on mostrad frase
cursor 4
global ss,cst,che_stampa,fr_ric
if ss <= 0 then ss to 1
set the visible of sprite 18 to false
if frase <= 794 then
set codice to item 1 of line frase of field 120
else
set codice to item 1 of line (frase-794) of field 121
end if
-- put "codice", codice
if char 1 of codice <> "#" then
put "Codice non presente"
cursor -1
exit
end if
set fr_ric to line frase of field 58
delete the last char of fr_ric
set tipo to c_tipo(codice)
case tipo of
"principio":
--DEF PRINCIPI SCIENTIFICI1
set ps1 to char 2 to 4 of codice
set the member of sprite 15 to member ps1 of castlib "defini"
-- set the castnum of sprite 15 to cast ps1
set the scrollTop of member (member ps1 of castlib "defini") to 0
if the lineCount of member(the member of sprite 15)>16 then
set the visible of sprite 5 to true
set the visible of sprite 6 to true
else
set the visible of sprite 5 to false
set the visible of sprite 6 to false
end if
set che_stampa to ps1
-------------FINE DEFPS1
"def":
set cst to char 2 to 6 of codice
set the member of sprite 15 to member cst of castLib "defini"
-- set the castnum of sprite 15 to cast cst
set the scrollTop of member (member cst of castLib "defini") to 0
if the lineCount of member(the member of sprite 15)>16 then
set the visible of sprite 5 to true
set the visible of sprite 6 to true
else
set the visible of sprite 5 to false
set the visible of sprite 6 to false
end if
set che_stampa to cst
"inventore":
set ori to char 2 to 6 of codice
set cddrive to char 1 of the moviepath
cursor 4
if the machinetype<256 then
go "menu" of movie "invenzioni:invenzio:tori:"&ori&".dir"
else
go "menu" of movie cddrive&":\invenzio\tori\"&ori&".dir"
end if
exit
---------------SOTTO_INVENZIONI1---------------------------------------------
"sottoinv":
global correlati
set correlati to char 2 to 6 of codice
set the membernum of sprite 15 to member 4987
updatestage
CPS
"invenzione":
------------INVENZIONI2
set oni to char 2 to 6 of codice
set cc to integer(char 3 to 5 of oni)
set cddrive to char 1 of the moviepath
set onipath to item 2 of line cc of field "invenzioni"
cursor 4
if the machinetype<256 then
go "menu" of movie "invenzioni:invenzio:"&onipath&":"&oni&".dir"
else
go "menu" of movie cddrive&":\invenzio\"&onipath&"\"&oni&".dir"
end if
exit
end case
---------------------------------------------------TIMELINE
set castart to 124
set inizio to 1
set fine to the lineCount of member 124
set pivot to integer ((fine-inizio+1)/2)
set stringa to line frase of field 58
delete the last char of stringa
set strpivot to item 2 to (the number of items in line pivot of field castart) of line pivot of field castart
set oldpivot to 1
repeat while pivot <> oldpivot
if stringa = strpivot then
set riga to pivot
exit repeat
else
if stringa > strpivot then
set inizio to pivot + 1
else
set fine to pivot -1
end if
set oldpivot to pivot
set pivot to integer ((fine-inizio+1)/2) + inizio
set strpivot to item 2 to (the number of items in line pivot of field castart) of line pivot of field castart
end if
set riga to pivot
end repeat
-------------------------------------------------------------------------------------------------------------------------------------
if item 2 to (the number of items in line riga of field castart) of line riga of field castart = fr_ric then
set tmp to line riga of field castart
set tmp to item 1 of tmp
time_line tmp
set the visible of sprite 18 to true
else
set the visible of sprite 18 to false
put "no timeline"
end if
------------------------------------ALBERI
set castart to 125
set inizio to 1
set fine to the lineCount of member 125
set pivot to integer ((fine-inizio+1)/2)
set stringa to line frase of field 58
delete the last char of stringa
set x to line pivot of field castart
set a to the number of items in x
if integer(item a-1 of x) then
set strpivot to item a of x
else
set strpivot to ((item (a-1) of x) &","& (item a of x))
end if
set a_str to strpivot
set oldpivot to 1
repeat while pivot <> oldpivot
-- put "strpivot",strpivot
-- put "pivot",pivot
-- put "frase",frase
if stringa = strpivot then
set riga to pivot
exit repeat
else
if stringa > strpivot then
set inizio to pivot + 1
else
set fine to pivot -1
end if
set oldpivot to pivot
set pivot to integer ((fine-inizio+1)/2) + inizio
set x to line pivot of field castart
set a to the number of items in x
if integer(item a-1 of x) then
set strpivot to item a of x
else
set strpivot to ((item (a-1) of x) &","& (item a of x))
end if
end if
set riga to pivot
end repeat
if strpivot = fr_ric then
set lista_alb to ""
if integer(item a-1 of x) then
repeat with gg = 1 to integer(item a-1 of x)
put item gg of x into item gg of lista_alb
end repeat
else
repeat with gg = 1 to integer(item a-2 of x)
put item gg of x into item gg of lista_alb
end repeat
end if
updatestage
alberi lista_alb
set the visible of sprite 4 to true
global vis
repeat with x = 20 to 22
set the visible of sprite x to false
end repeat
repeat with x = 20 to vis
set the visible of sprite x to true
end repeat
formatta
updatestage
else
set the visible of sprite 4 to false
repeat with x = 20 to 22
set the visible of sprite x to false
-- delete field x+56
end repeat
put "no alberi"
end if
cursor -1
-------------------------------------------------------------------------------------------------------------------------------------
end