hello all-

Messing with a handler that reports the highest occupied sprite channel
(for spawning/puppeting new sprites), I find myself a a bit stumped.

The handler below works, but only for the current frame; if the user
jumps to a frame containing more sprites than the current one, the info
is inaccurate, and my poor puppets cause errors.

Is there any way I can check ALL the frames without actually playing
them?


on getEmptyChannel me
  tLastChan = the lastChannel
  --find the last OCCUPIED channel
  repeat with i = tLastChan down to 1
    if sprite(i).type <> 0 then
      --return the EMPTY channel after it
      emptyChan = i + 1
      exit repeat
    end if
  end repeat
  return emptyChan
end

regards and thanks
Clars Danvold

[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to