At 18:32 -0500 24/01/02, Carol Mahaffy wrote:
>hey list --
>simple question.. i thought i saw something a while ago... a simple toggle
>using a "not" to swap sprites but i am really getting the syntax wrong. can
>anyone help? heres the code
>
>on mouseUp me
>   member("music_on").name = not member("music_off").name
>end

Well, if you *really* need to do it in one line:  ;-)

   sprite(me.spriteNum).member =\
   ["a", "b"][(sprite(me.spriteNum).member.name = "a") + 1]


Jakob

P.S.
This is where Colin pops up with "one" half the length, right?   ;-)
[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