home *** CD-ROM | disk | FTP | other *** search
/ A Virtual Reality Guide to Texas / CD.iso / texdata / arcextra / extras.cst / 00105_paging.ls < prev    next >
Encoding:
Text File  |  1998-06-23  |  867 b   |  29 lines

  1. on checkpage
  2.   global lastflip
  3.   
  4.   if the timer - 300 > lastflip then
  5.     flip
  6.     set lastflip = the timer
  7.   end if
  8. end
  9.  
  10. on flip
  11.   set cnum = the castnum of sprite 1
  12.   set cname = the name of cast cnum
  13.   set numchars = the number of chars in cname
  14.   
  15.   set nextpage = the number of chars of (the name of cast (cnum+1))
  16.   -- eye# has 4 characters, range# has 6, rose# has 5, so the number of characters in the name
  17.   -- must be the same for the next background to be the right one
  18.   if numchars = nextpage then
  19.     set the castnum of sprite 1 = cnum + 1
  20.     set the castnum of sprite 3 = the castnum of sprite 3 + 1
  21.     set the castnum of sprite 4 = the castnum of sprite 4 + 1
  22.   else
  23.     set the castnum of sprite 1 = cnum - 4
  24.     set the castnum of sprite 3 = the castnum of sprite 3 - 4
  25.     set the castnum of sprite 4 = the castnum of sprite 4 - 4
  26.   end if
  27. end
  28.  
  29.