Editing text in a MIAW

Date:    Thu, 31 Aug 1995 11:28:09 U
From:    "M.P.Stratfold (Matthew Stratfold)" <M.P.Stratfold@OPEN.AC.UK>
Subject: Tip: MIAW Projector text field bug
I'm using multiple MIAWs and have editable text fields on the stage. As has already be observed, making a projector of such a movie means that you can't edit a text field on the stage.

Below is my enhancement of the work around for this. This routine can cope with many textfields on the same frame, and can be put in a shared movie script / shared cast and will then will make all your text fields work.

For each of the MIAWs I open I send this code...

  open window "windowname"
  set theCommand to "tell the Stage to CheckKey"
  tell window "windowname" to set the keyDownScript to theCommand
Now this routine can be included in a shared movie script in shared cast.
on CheckKey
  if the clickon=0 then exit
  put the name of cast the castnum of sprite the clickon into castclicked
  if the casttype of cast castclicked<>#text then exit
  if the key = Backspace then delete the last char of field castclicked
  else put the key after field castclicked
end CheckKey