At 3:59 PM +0200 9/4/00, Andreas Gaunitz wrote:
>Beloved list,
>
>
>I have 2 behaviors attached to the same sprite. In one bhv resides
>the handler getSomeData.
>
>Now I would like to execute getSomeData from within the other script,
>but without using sendSprite and absolutely no globals.
>
>What to do? (I *can* use sendSprite, but maybe there's some less
>cumbersome way?)
>
>The meaning of this is to make the sprite act as a placeholder for a
>lot of small behavior scripts that communicate with each other.
If the movie is running:
-- behavior #1
property spriteNum
on doYourThing me
theData = call(#getSomeData, (sprite spriteNum))
end doYourThing
-- behavior #2
property spriteNum
on getSomeData me
return #someData
end getSomeData
(The code above assumes that there's only one behavior attached to the
current sprite with a "getSomeData" handler.)
If the movie is not running you could modify the "doYourThing" handler to
search the scriptList for the behavior that has the #getSomeData handler.
Regards,
Terry
--
...---===| Terry R. Schussler |===---...
...---===| DIA Chief Investigator |===---...
on visitWebsite yourSelection
coolSites = [ \
#greatSeminars : "http://www.macromediaseminars.com/", \
#directorIntelligenceAgency: "http://www.director8.com", \
#freeBehaviors : "http://www.behaviors.com/"]
gotoNetPage coolSites.yourSelection
end visitWebsite
[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!]