Here is a simple way to do this.
E-mail lingo, might not work =)
--CODE
global gIsRed
gIsRed is FALSE from the beginning
if the clickOn then
if not gIsRed then
gIsRed = TRUE
else
gIsRed = FALSE
end if
end if
end
--/CODE

then have the sprite clicked on check for gIsRed TRUE / FALSE
--MORE CODE
> --makeRed attached to the sprites that turn red
global gIsRed
on mouseDown / Up
if gIsRed then
makeRed()
else
otherHandler()
end if
> on makeRed me
>   global clickedSprite
>   sprite(clickedSprite).backcolor=35
> end
--/MORE CODE

You will have to toggle gIsRd back and forth tween TRUE and FALSE depending
on the action of the user.
____________________________________________
Mikael Wir�n
Knowledge Network
Klubbacken 30
129 39 H�GERSTEN
Tel: +46-(0)8-646 24 31
Mob: +46-(0)709-15 24 30
Mail: [EMAIL PROTECTED]
Web: HTTP://www.knowledgenetwork.se
____________________________________________


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Richie Jindal
> Sent: den 14 september 2001 10:28
> To: list
> Subject: <lingo-l> button-click to activate functionality
>
>
> Since I did not any reply to this mail yesterday, i
> send it again...
>
> Hi Everybody,
>
> I want a feature in which there are a few
> buttons..when the user clicks on a button that says
> 'turn red' it activates a functionality and turns any
> sprite that is clicked after that into red.
> I have managed to do the reverse that is, if the user
> clicks a sprites and then clicks 'make red' the sprite
> turns red..the code is like this:
>
> --this handler is attached to the make red button
> on mouseUp me
>   global clickedSprite  --where clickedsprite is a
> variable that stores the last sprite clicked before
> the button

>

>
> but I wud like to have it the other way, means first
> click the button and then the sprite to be turned
> red.. any suggestions how I cud do it???????
>
> Regards,
> Richie
>
>
> __________________________________________________
> Terrorist Attacks on U.S. - How can you help?
> Donate cash, emergency relief information
> http://dailynews.yahoo.com/fc/US/Emergency_Information/
>
> [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!]
>
>


[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!]

Reply via email to