> on keyPressed me
>   keyup
> end
>
>
> on KeyUp me
>   if the keyPressed = "c" or the keyPressed = "C" then
>     sprite(17).blend = 100
>   else
>     sprite(18).blend = 100
>   end if
> end
>
> If you press c it still does the else loop
>
> what ever key you press it is doing the else command and not the if?

Your approach to checking for keys is giving you difficulty.

Try:

on keyDown me (or keyUp me)
        if the key = "c" then
                sprite(17).blend = 100
        else
                sprite(18).blend = 100
        end if
end

Be aware that to receive a keyDown/Up handler you will probably need an
editable sprite on stage.

Better still to perhaps use keyPressed polling in an exitFrame hendler:

on exitFrame me
        if keyPressed("c") then
                sprite(17).blend = 100
                sprite(18).blend = otherBlendValue
        else
                sprite(17).blend = otherBlendValue
                sprite(18).blend = 100
        end if
end

HTH,
-Sean.


[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