home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Boot Disc 1
/
boot-disc-1996-08.iso
/
bootcd.dir
/
00648_Script_TVClass
< prev
next >
Wrap
Text File
|
1996-07-02
|
2KB
|
81 lines
property primecast,imagelist,staticcount,spritenum,duration,staticmax
property nextevent,imagecount
on new me
set imagelist=[]
set staticcount=0
set duration=3*60
set staticmax=the frameTempo
set nextevent=0
set numitems=0
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
end if
end repeat
set imagecount=0
set spritenum=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 the ticks<nextevent then exit
puppetsound 0,3
puppetsound "noiz",3
repeat with index=1 to staticMax
set the castnum of sprite spritenum to the number of cast ("Static"&((index mod staticcount)+1))
updatestage
end repeat
set imagecount=(imagecount mod count(imagelist))+1
set the membernum of sprite spritenum to getat(imagelist,imagecount)
set nextevent=the ticks+duration
updateStage
end
on dispose me
set pos=getpos(the actorlist,me)
deleteat the actorlist,pos
puppetsprite spritenum,false
return 0
end