At 11:20 AM -0400 6/22/01, Bill Numerick wrote:
>Is there a way to send a large group of sprites with a script
>attached params without using the sendAllsprites and without using a
>repeat loop?
Why do you not want to use either of these approaches? These are the
two standard ways.
>
>It seems faster if i use a sendAllsprites instead of using a repeat
>loop anyone know if that's true?
I would guess that the repeat loop is faster if you limit the number
of sprites you broadcast the message to. For example, you could sent
up a list of sprites that you want to communicate with and then only
send the message to those:
repeat with aSpriteNumber in myListOfSpriteNumbers
sendSprite(aSpriteNumber, #someMessage)
end repeat
That has got to be faster than:
sendAllSprites(#someMessage)
But, if you really want to find out, add your own timing test:
startTime = the milliseconds
repeat with aSpriteNumber in myListOfSpriteNumbers
sendSprite(aSpriteNumber, #someMessage)
end repeat
put "Repeat loop test took" && (the milliseconds - startTime)
startTime = the milliseconds
sendAllSprites(#someMessage)
put "sendAllSprites test took" && (the milliseconds - startTime)
>
>One last question :). Can you send params to multiple handlers in
>on sendSprite command?
No, sendSprite works by calling one handler.
Irv
--
Lingo / Director / Shockwave development for all occasions.
(Home-made Lingo cooked up fresh every day just for you.)
[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!]