At 2:16 PM -0500 3/1/01, g r i m m w e r k s wrote:
>
>So it turns out that a parent script object WILL receive a sendallsprites
>command, but it won't deal with it right...
>
Yo Grim,
I certainly do believe that you are reporting what you are seeing,
but I don't believe the above conclusion is correct. So I decided to
test it.
I built a small test program that just had two sprites in channels 1
and 2. To each sprite I attached this behavior:
property spriteNum
on checkExitInfo me
put "In checkExitInfo of sprite:" && spriteNum
end
And I created a global object which I instantiated from the
startMovie handler using the following parent script:
-- ComLink
property spriteNum
on new me
return me
end
on checkExitInfo me
put "In ComLink's version of checkExitInfo"
end
I added a " go to the frame" and let it run.
Here is the output from the message window:
-- Welcome to Director --
sendallsprites(#CheckExitInfo)
-- "In checkExitInfo of sprite: 1"
-- "In checkExitInfo of sprite: 2"
So, sendallsprites does not send a message to a global object that
has a handler of the same name.
I'm guessing that what you are seeing has something to do with the
fact that you are calling sendallsprites and trying to get back a
value. In your original post, you said that you were doing:
temp=sendallsprites(#checkExitInfo)
put temp
If your "checkExitInfo" is returning a value, the values will
overwrite each other, the only value you will get returned will be
from the last sprite with a "checkExitInfo" handler. Unless you are
passing a list as a variable where each behavior optionally adds
something to the list, trying to get a value back from sendallsprites
is not advised.
Irv
--
Lingo / Director / Shockwave development for all occasions.
(Over two millions lines of Lingo code served!)
[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!]