home *** CD-ROM | disk | FTP | other *** search
- on clearActorList
- set n to count(the actorList)
- repeat with i = 1 to n
- set p to getAt(the actorList, 1)
- deleteAt(the actorList, 1)
- set p to 0
- end repeat
- set the actorList to []
- end
-
- on appenddragedobject obj
- if objectp(obj) then
- add(the actorList, obj)
- end if
- end
-
- on erasedragedobject obj
- if objectp(obj) then
- set i to findIn(the actorList, obj)
- if 0 < i then
- deleteAt(the actorList, i)
- enddrag(obj)
- destroy(obj)
- set p to 0
- end if
- end if
- end
-
- on appendanimateobject obj
- if objectp(obj) then
- add(the actorList, obj)
- end if
- end
-
- on eraseanimateobject obj
- if objectp(obj) then
- set i to findIn(the actorList, obj)
- if 0 < i then
- deleteAt(the actorList, i)
- destroy(obj)
- set p to 0
- end if
- end if
- end
-
- on findIn l, o
- set c to count(l)
- repeat with i = 1 to c
- if getAt(l, i) = o then
- return i
- end if
- end repeat
- return 0
- end
-