At 9:28 PM +0530 3/2/01, Ravi Garimella wrote:
>Hi All
>
>I am having trouble having counting Keystrokes. Here is my script. I
>want the user to press the key only once otherwise
>nothing. The book says that theKey, the keyPressed and the Keycode
>always indicate the last key pressed. How do i get
>over it.
>
Here's an approach (untested):
property pfBlended -- property flag - have we blended yet? No need
for a global
on beginSprite me
pfBlended = FALSE
end
on keyUp me
if not(pfBlended) then
if the Key = "c" then -- don't need to worry about uppercase
sprite(17).blend = 100
pfBlended = TRUE
return
else if the Key = "a" then
sprite(1*).blend = 100
pfBlended = TRUE
return
end if
end if
pass
end
Irv
--
Lingo / Director / Shockwave development for all occasions.
(Over two millions lines of Lingo code served!)
[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!]