home *** CD-ROM | disk | FTP | other *** search
/ Boot Disc 2 / boot-disc-1996-10.iso / Lip.dir / 00046_Script_StatusClass < prev   
Text File  |  1996-08-09  |  1KB  |  48 lines

  1. property msglist,lastframe
  2.  
  3. on new me
  4.   global gStatus
  5.   -- This section populates the msglist
  6.   set msglist=[:]
  7.   set olddelimiter=the itemdelimiter
  8.   set the itemdelimiter=":"
  9.   set msglisttext=the text of field "msglisttext"
  10.   repeat with curlinenum=1 to the number of lines in msglisttext
  11.     set curline=line curlinenum of msglisttext
  12.     addprop msglist,value("#"&(item 1 of curline)),item 2 of curline
  13.   end repeat
  14.   set the itemdelimiter=olddelimiter
  15.   set gStatus=me
  16.   put "Initializing"&me
  17.   add the actorlist,me
  18.   return me
  19. end
  20.  
  21. on status me,whichcast
  22.   if voidP(whichcast) then
  23.     if the mousecast>0 then
  24.       set whichcast=the name of member (the mousecast)
  25.     end if
  26.   end if
  27.   if voidP(getaprop(msglist,whichcast)) then
  28.     set whichcast="default"
  29.   end if
  30.   -- put whichcast into field "DemoInfo"
  31.   if the frame=lastframe then
  32.     if not voidP(getaprop(msglist,whichcast)) then
  33.       put getprop(msglist,whichcast) into field "status"
  34.     end if
  35.   end if
  36.   set lastframe=the frame
  37. end
  38.  
  39. on stepframe me
  40.   status me
  41. end
  42.  
  43.  
  44. on setbtntext me,whichbtn,btntext
  45.   set whichbtn=value("#"&whichbtn)
  46.   setprop msglist,whichbtn,btntext
  47. end
  48.