home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Boot Disc 2
/
boot-disc-1996-10.iso
/
bootcd.dir
/
00297_Script_TVClass
< prev
next >
Wrap
Text File
|
1996-08-09
|
3KB
|
128 lines
property primecast,imagelist,staticcount,spritenum,duration,staticmax
property nextevent,imagecount,staticindex,videomode,videosprite,videolist
on new me
set imagelist=[]
set videolist=[]
set staticcount=0
set duration=3*60
set staticmax=the frameTempo/3
set nextevent=0
set numitems=0
set videomode=false
repeat with index=1 to the number of members
if the casttype of member index=#bitmap then
set curname=the name of member index
if offset("tvp_",curname) then
set primecast=index
add imagelist,index
end if
if offset("tv_",curname) then
add imagelist,index
set numitems=numitems+1
preload member curname
if numitems mod 4=0 then
add imagelist,primecast
end if
end if
if offset("static",curname) then
set staticcount=staticcount+1
preload member curname
end if
if offset("tvm_",curname) then
add videolist,index
end if
end if
end repeat
set imagecount=0
set spritenum=0
repeat with index=1 to 48
if the membernum of sprite index>0 then
if the type of member (the membernum of sprite index)=#digitalVideo then
set videosprite=index
end if
end if
end repeat
set the movieRate of sprite videosprite to 0
set the visible of sprite videosprite to 0
repeat with index=1 to 48
if the membernum of sprite index=primecast then
set spritenum=index
exit repeat
end if
end repeat
if spritenum=0 then
alert "Can't find primary image."
halt
end if
puppetsprite spritenum,true
set obj=getObj("TVClass")
if objectP(obj) then
set pos=getpos(the actorlist,obj)
deleteat the actorlist,pos
end if
add the actorlist,me
set nextevent=the ticks+duration
return me
end
on stepframe me
if videomode=false then
if the ticks>nextevent then
if staticindex=0 then
puppetsound 0,1
puppetsound "noiz",1
end if
set staticindex=staticindex+1
set the castnum of sprite spritenum to the number of cast ("Static"&((staticindex mod staticcount)+1))
updatestage
if staticindex=staticmax then
set staticindex=0
set imagecount=(imagecount mod count(imagelist))+1
set the membernum of sprite spritenum to getat(imagelist,imagecount)
set nextevent=the ticks+duration
set staticindex=0
updateStage
end if
end if
else
if the movietime of sprite videosprite=trackStopTime(sprite videosprite, 1) then
stopvideo me
end if
end if
end
on dispose me
set pos=getpos(the actorlist,me)
deleteat the actorlist,pos
puppetsprite spritenum,false
return 0
end
on playvideo me
if videomode then
stopvideo me
else
set videomode=true
puppetsound 0
set the visible of sprite videosprite to true
set the visible of sprite spritenum to false
set the movierate of sprite videosprite to 1
end if
end
on stopvideo me
set videomode=false
set the visible of sprite videosprite to false
set the movierate of sprite videosprite to 0
set the movietime of sprite videosprite to trackstarttime(sprite videosprite,1)
set the pausedAtStart of member (the membernum of sprite videosprite) to true
set the visible of sprite spritenum to true
end