home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Boot Disc 2
/
boot-disc-1996-10.iso
/
Lip.dir
/
00019_Script_PrimaryMovieScriptForLip
< prev
next >
Wrap
Text File
|
1996-08-09
|
10KB
|
335 lines
global videosprite,videolist
on startmovie
set videosprite=9
set the visible of sprite videosprite to false
set the volume of sprite videosprite to 255
set videoList=["selker1","selker2","selker3","selker4","selker5"]
deactivatePlay
put " " into field "Status"
set the actorlist=[]
new(script "StatusClass")
end
on stop movie
resetpuppets
set the actorlist=[]
end
on activatePlay
set the visible of sprite videosprite to true
set spritenum=castsprite("ctrlBtns_Play")
if spritenum=0 then exit
set stopsprite=castsprite("ctrlBtns_StopDown")
puppetsprite spritenum,true
set the membernum of sprite spritenum=the number of member "ctrlBtns_PlayDown"
if stopsprite<>0 then
puppetsprite stopsprite,true
set the membernum of sprite stopsprite=the number of member "ctrlBtns_Stop"
end if
updateStage
set the movieRate of sprite videosprite to 1.0
end
on deactivatePlay
set the movieRate of sprite videosprite to 0.0
set stopsprite=castsprite("ctrlBtns_Stop")
if stopsprite=0 then exit
puppetsprite stopsprite,true
set the membernum of sprite stopsprite to the number of member "ctrlBtns_StopDown"
updateStage
set spritenum=castsprite("ctrlBtns_PlayDown")
if spritenum=0 then exit
puppetsprite spritenum,true
set the membernum of sprite spritenum=the number of member "ctrlBtns_Play"
updateStage
end
on fastsearch delta
set spritenum=the clickon
puppetsprite spritenum,true
set curcast=the membernum of sprite spritenum
set castname=the name of cast curcast
set curdown=the membernum of member (castname&"Down")
set the membernum of sprite spritenum to curdown
updateStage
set oldrate=the movieRate of sprite videosprite
set the movieRate of sprite videosprite to delta*5.0
repeat while the mousedown
end repeat
set the membernum of sprite spritenum to curcast
updateStage
set the movieRate of sprite videosprite to oldRate
end
on slowsearch delta
set spritenum=the clickon
puppetsprite spritenum,true
set curcast=the membernum of sprite spritenum
set castname=the name of cast curcast
set curdown=the membernum of member (castname&"Down")
set the membernum of sprite spritenum to curdown
updateStage
set oldrate=the movieRate of sprite videosprite
set the movieRate of sprite videosprite to delta*0.3
repeat while the mousedown
end repeat
set the membernum of sprite spritenum to curcast
updateStage
set the movieRate of sprite videosprite to oldRate
end
on setvideo time
if time=#start then set time=0
if time=#end then
set time=the duration of member (the membernum of sprite videosprite)
end if
set the movietime of sprite videosprite to time
end
on setVsoundpos castname,minpos,maxpos,orient
set spritenum=castsprite(castname)
puppetsprite spritenum,true
set pos=maxpos-(the volume of sprite videosprite)*(maxpos-minpos)/255
if orient=#vert then
set the locV of sprite spritenum to pos
else
set the locH of sprite spritenum to pos
end if
updateStage
end
on setVSoundval minpos,maxpos,orient
set spritenum=the clickon
puppetsprite spritenum,true
set upcast=(the membernum of sprite spritenum)
set basename=the name of member upcast
set downcast=the number of member (basename&"Down")
set the membernum of sprite spritenum to downcast
if orient=#vert then
set delta=the mouseV-the locV of sprite spritenum
else
set delta=the mouseH-the locH of sprite spritenum
end if
repeat while the mousedown
if orient=#vert then
set the locV of sprite spritenum to min(max(the mouseV-delta,minpos),maxpos)
else
set the locH of sprite spritenum to min(max(the mouseH-delta,minpos),maxpos)
end if
updateStage
if orient=#vert then
set the volume of sprite videosprite to 255-min(max(integer((the locV of sprite spritenum)-minpos)*256/(maxpos-minpos),0),255)
else
set the volume of sprite videosprite to 255-min(max(integer((the locH of sprite spritenum)-minpos)*256/(maxpos-minpos),0),255)
end if
-- global gStatus
-- setBtnText gStatus,basename&"Down","The volume is "&getat(soundlist,the soundlevel+1)
end repeat
set the membernum of sprite spritenum to upcast
updateStage
end
on isVideoDone
if the movieTime of sprite videosprite>=trackstoptime(member (the castnum of sprite videosprite),1) then
deactivatePlay
playNextVideo
end if
end
on playNextVideo
set the movieRate of sprite videosprite to 0
set the movieTime of sprite videosprite to 0
end
on pressbtn
set spritenum=the clickon
set upcast=the membernum of sprite spritenum
set downcastname=the name of member (upcast)&"down"
set downcast=the number of member (downcastname)
puppetsprite spritenum,1
set the membernum of sprite spritenum to downcast
updatestage
repeat while the mousedown
end repeat
set the membernum of sprite spritenum to upcast
updateStage
puppetsprite spritenum,false
return rollover(spritenum)
end
on setpuppets startpuppet,endpuppet,state
repeat with spritenum=startpuppet to endpuppet
puppetsprite spritenum,state
end repeat
end
on getObj objname
set oldDelimiter=the itemDelimiter
set the itemDelimiter=quote
set foundobj=0
repeat with obj in the actorlist
if item 2 of string(obj)=objname then
set foundobj=obj
exit repeat
end if
end repeat
set the itemDelimiter=oldDelimiter
return foundobj
end
on makeDescr startcast,endcast,prefix
repeat with index=startcast to endcast
set text=the text of member index
set the name of member index to prefix&(line 1 of text)
end repeat
end
on getDrive
set drive=the moviepath
set oldDelimiter=the itemdelimiter
set the itemdelimiter=":"
set drive=(item 1 of drive)&":"
set the itemdelimiter=oldDelimiter
return drive
end
on numbercast startcast,endcast,startval
if voidP(startval) then set startval=1
repeat with curcast=startcast to endcast
set the name of member curcast to (the name of member curcast)&(startval+curcast-startcast)
end repeat
end
on setsoundpos castname,minpos,maxpos,orient
set spritenum=castsprite(castname)
puppetsprite spritenum,true
set pos=maxpos-(the soundlevel)*(maxpos-minpos)/7
if orient=#vert then
set the locV of sprite spritenum to pos
else
set the locH of sprite spritenum to pos
end if
updateStage
end
on setSoundval minpos,maxpos,orient
set spritenum=the clickon
set soundlist=["mute","barely audible","very quiet","quiet","moderate","medium loud","loud","loudest"]
puppetsprite spritenum,true
set upcast=(the membernum of sprite spritenum)
set basename=the name of member upcast
set downcast=the number of member (basename&"Down")
set the membernum of sprite spritenum to downcast
repeat while the mousedown
if orient=#vert then
set the locV of sprite spritenum to min(max(the mouseV,minpos),maxpos)
else
set the locH of sprite spritenum to min(max(the mouseH,minpos),maxpos)
end if
updateStage
if orient=#vert then
set the soundlevel=7-min(max(integer((the locV of sprite spritenum)-minpos)*8/(maxpos-minpos),0),7)
else
set the soundlevel=7-min(max(integer((the locH of sprite spritenum)-minpos)*8/(maxpos-minpos),0),7)
end if
global gStatus
setBtnText gStatus,basename&"Down","The volume is "&getat(soundlist,the soundlevel+1)
puppetsound "LED05.AIF"
end repeat
set the membernum of sprite spritenum to upcast
updateStage
end
on castsprite castname
set spritenum=0
repeat with index=1 to 48
if the membernum of sprite index>0 then
if the name of member (the membernum of sprite index)=castname then
set spritenum=index
exit repeat
end if
end if
end repeat
return spritenum
end
on resetpuppets
repeat with spritenum=1 to 48
if the castnum of sprite spritenum>0 then
if the puppet of sprite spritenum then
set the puppet of sprite spritenum to false
end if
end if
set the visible of sprite spritenum to true
end repeat
end
on launchMovie moviename,whichbtn
global moviebtnlist
if moviebtnlist=0 then
set moviebtnlist=[]
set moviebtn1=castsprite("LipTopic")
add moviebtnlist,moviebtn1
repeat with spritenum=moviebtn1+1 to 48
if the castnum of sprite spritenum>0 then
if the name of member (the membernum of sprite spritenum)="LipTopic" then
add moviebtnlist,spritenum
end if
end if
end repeat
end if
if voidP(whichbtn) then
set whichsprite=the clickon
else
set whichsprite=getat(moviebtnlist,whichbtn)
end if
if not getbasepath() then exit
repeat with index=1 to count(moviebtnlist)
set spritenum=getat(moviebtnlist,index)
if not (the puppet of sprite spritenum) then
set the puppet of sprite spritenum to true
end if
if spritenum=whichsprite then
set the membernum of sprite spritenum to the number of member "LipTopicDown"
else
set the membernum of sprite spritenum to the number of member "LipTopic"
end if
end repeat
updateStage
set the filename of member (the membernum of sprite videosprite) to getBasePath()&moviename&string(getpos(moviebtnlist,whichsprite))&".avi"
activateplay
end
on getBasePath
repeat with index=3 to 27
set drive=numtochar(64+index)
if fileExists(drive&":\bootcd\keylock.rsc") then
exit repeat
end if
end repeat
if drive=numtochar(91) then
alert("The bootCD was not found. Please insert it into your disk drive to launch any applications.")
return false
end if
set basepath=drive&":\bootcd\movies\"
return basepath
end
on fileExists filename
set file=fileIO(mNew,"read",filename)
if objectP(file) then
file(mDispose)
return true
else
return false
end if
end
on wait numseconds
startTimer
repeat while the timer<numseconds*60
if the mousedown then exit repeat
end repeat
end