I have a fill in the blank question with a text cast member. On the
sprite of the text cast member I have the following code:
global gAnswer
global gEntryText
global gCount
global gKeyCount
global gMatch
on beginSprite me
sprite(the currentSpriteNum).member.text = ""
sprite(the currentSpriteNum).editable = 1
gAnswer = sprite(the currentSpriteNum).member.name
gEntryText = sprite(the currentSpriteNum).member.text
gCount = gAnswer.length
gKeyCount = 0
gMatch = 1
end
on keyDown me
case (the keyCode) of
51:
delete the last char of member gAnswer
if gKeyCount = 0 then
nothing
else
gKeyCount = gKeyCount - 1
end if
117:
delete the last char of member gAnswer
if gKeyCount = 0 then
nothing
else
gKeyCount = gKeyCount - 1
end if
otherwise:
gKeyCount = gKeyCount + 1
pass
end case
end
on keyUp me
gEntryText = sprite(the currentSpriteNum).member.text
gMatch = 0
repeat with x = gEntryText.length down to 1
if char x of gEntryText = char x of gAnswer then
gMatch = gMatch + 1
end if
end repeat
end
on exitFrame me
if gAnswer = gEntryText then
if gMatch = gKeyCount then
sprite(the currentSpriteNum).member.color = rgb(0, 0, 255)
else
sprite(the currentSpriteNum).member.color = rgb(0, 0, 0)
end if
go to the frame + 1
gEntryText = ""
else
go to the frame
if gMatch = gKeyCount then
sprite(the currentSpriteNum).member.color = rgb(0, 0, 255)
else
sprite(the currentSpriteNum).member.color = rgb(0, 0, 0)
end if
end if
end
________________________________
The cursor disappears. I want it to be blinking when the user gets to
the screen, and while the user is typing. What am I missing?
Sharon Moeller
[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!]