home *** CD-ROM | disk | FTP | other *** search
/ GU Photo: Background 3 / GU.iso / pc / browser_4m_ / browser_4m_.dxr / 00162.ls < prev    next >
Encoding:
Text File  |  1994-09-30  |  947 b   |  55 lines

  1. on clearActorList
  2.   set n to count(the actorList)
  3.   repeat with i = 1 to n
  4.     set p to getAt(the actorList, 1)
  5.     deleteAt(the actorList, 1)
  6.     set p to 0
  7.   end repeat
  8.   set the actorList to []
  9. end
  10.  
  11. on appenddragedobject obj
  12.   if objectp(obj) then
  13.     add(the actorList, obj)
  14.   end if
  15. end
  16.  
  17. on erasedragedobject obj
  18.   if objectp(obj) then
  19.     set i to findIn(the actorList, obj)
  20.     if 0 < i then
  21.       deleteAt(the actorList, i)
  22.       enddrag(obj)
  23.       destroy(obj)
  24.       set p to 0
  25.     end if
  26.   end if
  27. end
  28.  
  29. on appendanimateobject obj
  30.   if objectp(obj) then
  31.     add(the actorList, obj)
  32.   end if
  33. end
  34.  
  35. on eraseanimateobject obj
  36.   if objectp(obj) then
  37.     set i to findIn(the actorList, obj)
  38.     if 0 < i then
  39.       deleteAt(the actorList, i)
  40.       destroy(obj)
  41.       set p to 0
  42.     end if
  43.   end if
  44. end
  45.  
  46. on findIn l, o
  47.   set c to count(l)
  48.   repeat with i = 1 to c
  49.     if getAt(l, i) = o then
  50.       return i
  51.     end if
  52.   end repeat
  53.   return 0
  54. end
  55.