set adjustVLoc to 10 + the height of the member of sprite 10 + 18
set bugFix to the left of sprite 2
set myRect to the rect of sprite 2 + [0, 0, 0, adjustVLoc]
set the rect of sprite 2 to myRect
repeat with i in [1, 9, 12, 13, 15, 16]
set the locV of sprite i to the locV of sprite i + adjustVLoc
end repeat
checkBtnLocations(the bottom of myRect)
set offsetPoint to point(getAt(the rect of the stage, 1) + ((640 - the width of myRect) / 2), getAt(the rect of the stage, 2) + ((480 - the height of myRect) / 2))
set theRect to myRect + rect(offsetPoint, offsetPoint)
set the rect of the activeWindow to theRect
set the modal of the activeWindow to 1
set the visible of the activeWindow to 1
set pTextMaxH to 170
set theActiveField to the number of the member of sprite 12
set the editableText of sprite 12 to 1
set the selStart to 0
set the selEnd to 100
set the keyDownScript to "processKey(sprite 21)"
end
on processKey me
if (the key = RETURN) or (the key = ENTER) then
handleDefaultKeyDown(script 1)
else
if the key = BACKSPACE then
puppetSound(1, "deleteKey")
else
if the key = TAB then
if the number of the member of sprite 12 = theActiveField then
selectField(me, 13, 1)
else
selectField(me, 12, 1)
end if
else
if length(the selection) then
puppetSound(1, "key" & random(3))
else
if the locH of charPosToLoc(member theActiveField, length(field theActiveField)) >= pTextMaxH then
puppetSound(1, "fieldFull")
stopEvent()
else
puppetSound(1, "key" & random(3))
end if
end if
end if
end if
end if
end
on selectField me, whichSprite, fromTab
if not fromTab then
set the selStart to the selEnd
end if
if whichSprite = 12 then
set the editableText of sprite 13 to 0
else
set the editableText of sprite 12 to 0
end if
set the editableText of sprite whichSprite to 1
set theActiveField to the number of the member of sprite whichSprite