1 Reply Latest reply on Jul 24, 2006 3:21 AM by Newsgroup_User

    Send a behaviour to a sprite

    Level 7
      Hello:

      I have a behaviour with 1 parameter and I want to send to a sprite.
      How can I do it?

      Thanks


        • 1. Re: Send a behaviour to a sprite
          Level 7
          two ways.

          Assuming param is any type of variable that has been initialized and has a
          valid value, in the behavior from which you want to send the parameter, add:

          SendSprite (12, #TakeParam, param)

          or

          SendAllSprites (#TakeParam, param)


          then in behavior on sprite 12

          on TakeParam me, param
          put param -- (or do something else with param)
          end

          If you use the second option in the behavior of the sprite that is sending
          the parameter, every sprite will be checked for the TakeParam handler but
          only those with the TakeParam behavior will actually receive the message
          (and thus the parameter). Of course, I chose sprite 12 arbitrarily.


          --
          Craig Wollman
          Word of Mouth Productions

          phone 212 928 9581
          fax 212 928 9582
          159-00 Riverside Drive West #5H-70
          NY, NY 10032
          www.wordofmouthpros.com


          "Anne" <anmalo42@lycos.es> wrote in message
          news:ea25nu$b5c$1@forums.macromedia.com...
          > Hello:
          >
          > I have a behaviour with 1 parameter and I want to send to a sprite.
          > How can I do it?
          >
          > Thanks
          >