4 Replies Latest reply: Sep 29, 2014 5:55 AM by RemusM RSS

    Text field issue

    H.F. Duijndam Community Member

      Hi there, who can help me with this,

       

      i made some field members bij using insert --> control--> field = named Field 1

       

      and i made i the movie script the following lines

       

      put empty into field 1 = to start with an empty field

       

      then i put this line to get words at random

      put word random (5) of "zien lopen gaan zitten ziek" into field 1

       

      the problem is that the field is not seen as an field

      and so far there is no text displayed

       

      tia

       

      Herman

        • 1. Re: Text field issue
          SeanWilson Community Member

          Assuming you really did name your field "Field 1" then try:

          put word random (5) of "zien lopen gaan zitten ziek" into field "Field 1"

          • 2. Re: Text field issue
            H.F. Duijndam Community Member

            wel this was some old code which worked in an older movie

            thanks any way this works for me at the moment

             

            Herman

            • 3. Re: Text field issue
              H.F. Duijndam Community Member

              Hi Sean,

               

              wel it seems that old code not will work anymore

               

              maybe you will look at this for me, there are two fields named field 1 and FIeldCh.

              The content of field 1 must put in to fieldCh then if fieldCh has the correct content you can go. (This part seems to work)

               

              but if the content is different the field should be made empty

               

               

               

              on mouseDown

                cursor 4

                put field "field 1" into field "FieldCh"

                cursor 0

                if field "FieldCh" = "Alkmene" then

                  put empty into field "Field 1"

                end if

               

                if field "FieldCh" = <> "Alkmene" then  <-- this won't work

                put empty into field "Field 1"

                end if

               

              end

               

               

               

              Herman

              • 4. Re: Text field issue
                RemusM Community Member

                  if field "FieldCh" = "Alkmene" then

                    -- OK. perform any action you want

                  else

                    put empty into field "Field 1"

                  end if

                 

                cheers