home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Creative Review 28
/
Creative-Review-CD-ROM-28.iso
/
pc
/
kungfu
/
style.dir
/
00004_Script_4
< prev
next >
Wrap
Text File
|
1997-08-08
|
3KB
|
111 lines
-- scroll
global gScrollList
global gScrollHeight
global gClickedChan
global gClickedV
on hinitscroll
puppetsprite 24,true
set gScrollList = []
repeat with a = 2 to the number of lines in field "scroll data"
set currentlist = [:]
addprop currentlist , #chan1 , the value of word 1 of line a of field "scroll data"
addprop currentlist , #chan2 , the value of word 2 of line a of field "scroll data"
addprop currentlist , #cast1 , the value of word 3 of line a of field "scroll data"
addprop currentlist , #cast2 , the value of word 4 of line a of field "scroll data"
addprop currentlist , #Inc , the value of word 5 of line a of field "scroll data"
add gScrollList currentlist
end repeat
repeat with a = 1 to count (gScrollList)
set currentList = getat (gScrollList,a)
set Thechan1 = the chan1 of currentList
set Thechan2 = the chan2 of currentList
set Thecast1 = the cast1 of currentList
set Thecast2 = the cast2 of currentList
puppetsprite Thechan1,true
puppetsprite Thechan2,true
set the loch of sprite Thechan2 to the loch of sprite Thechan1
set the locv of sprite Thechan2 to the locv of sprite Thechan1 + ¼
the height of member Thecast1
set the castNum of sprite Thechan1 to Thecast1
set the castNum of sprite Thechan2 to Thecast2
end repeat
set gScrollHeight = the height of member Thecast1
end
on hupdatescroll
set vinc = -(the mousev - 240)
repeat with a = 1 to count (gScrollList)
set currentList = getat (gScrollList,a)
set Thechan1 = the chan1 of currentList
set Thechan2 = the chan2 of currentList
set TheVinc = the Inc of currentList
set TheVinc = vinc / TheVinc
set the locv of sprite Thechan1 to the locv of sprite Thechan1 + TheVinc
set the locv of sprite Thechan2 to the locv of sprite Thechan2 + TheVinc
if the locv of sprite Thechan1 > 480 + (gScrollHeight/2) then
set the locv of sprite Thechan1 to the locv of sprite Thechan2 - gScrollHeight
end if
if the locv of sprite Thechan2 > 480 + (gScrollHeight/2) then
set the locv of sprite Thechan2 to the locv of sprite Thechan1 - gScrollHeight
end if
if the locv of sprite Thechan1 < 0 - (gScrollHeight/2) then
set the locv of sprite Thechan1 to the locv of sprite Thechan2 + gScrollHeight
end if
if the locv of sprite Thechan2 < 0 - (gScrollHeight/2) then
set the locv of sprite Thechan2 to the locv of sprite Thechan1 + gScrollHeight
end if
end repeat
-- if voidp (gClickedV) = 0 then
-- set the locv of sprite 24 to the locv of sprite gClickedChan + gClickedV
-- end if
--
end