At 03:16 PM 10/30/01 -0800, you wrote:

>>Hi all, I would like to know if there is a big difference of speed using
>>call instead of sendAllSprites.
>
>Big difference. Call only goes to the one sprite/script, while 
>sendAllSprites goes to, well, all sprites. If you have a lot of sprites, 
>that could take a lot of time.

Call can also go to a list of objects, not just a single object.

I use SendAllSprites to broadcast a message....then any object can listen 
in and react to it, which helps when you're adding new functionality 
without specifically changing the broadcaster.

I use Call when I have a known list of objects to send a specific message to.

When I have big groups, I'll often have a SendAllSprites broadcast a 
message out to everyone on beginsprite, which passes a list (pass by 
reference, YEA) which all the other members of the group listen to and 
append their 'me' to.  Then, when I want to do specific calls later, I need 
only do the call on the pListOfSiblings.  Take the cpu hit just once in the 
beginning instead of every time you make a 'group' type call.

roymeo



>Cordially,
>
>Kerry Thompson


-----
Roy Crisman
Senior Macromedia Programmer
(716)724-4054
[EMAIL PROTECTED]


[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