At 19:44 +0000 03/04/2002, Jayp wrote:

>James I hope this doesn't sound too stupid... but I cant get the script
>u sne tworking...
>How do I call it once and pass it a member number...

In general when sending a command to a sprite you use the syntax:

   sendSprite ( whateverSprite, #function, parameter )

In this particular case if the behavior was attached to a sprite in 
channel 4, and the member you wanted to change was named 
"swapMember", your call would be:

   sendSprite ( 4, #mSetMember, "swapMember" )

However you're probably going to want to do this with another 
behavior that handles it on mouseUp, or mouseEnter, or whatever, and 
you might want to attach that behavior to the same sprite running 
this behavior, in which case you might instead do this:

   on mouseEnter me
     sendSprite ( me.spriteNum, #mSetMember, "swapMember" )
   end

...or you could just add the above directly to the same behavior 
script which contains the mSetMember() handler, so the command might 
then be:

   on mouseEnter me
     me. mSetMember( "swapMember" )
   end

Hope that helps.

-- 

              Warren Ockrassa | http://www.nightwares.com/
  Director help | Free files | Sample chapters | Freelance | Consulting
        Author | Director 8.5 Shockwave Studio: A Beginner's Guide
                    Published by Osborne/McGraw-Hill
          http://www.osborne.com/indexes/beginners_guides.shtml
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/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