1 Reply Latest reply on Mar 6, 2007 3:51 PM by Rothrock

    Three very basic Questions

    Adbul!
      Hi!

      I have a few simple questions regarding flash AS.

      Here we go...

      1. Apparently . onRelease doesnt work with keys, what kan i use then?

      2.How can I check if a textfield is empty?
      i tried both
      if (text=="")
      and
      if (text_txt.length ==0)
      3. How can i control so that an input field later comes out in a dynamic textfiel with all BIG LETTERS?


      Thanks in advance


      Adbul












        • 1. Re: Three very basic Questions
          Rothrock Level 5
          A few simple answers.

          1. Read the help files.

          2. Read the help files.

          3. Read the help files.

          Now the more helpful bits, that explain how to do the above. In general don't use search in the help files because it will only confuse you. Go to the ActionScript dictionary where everything is organized by class.

          1. MovieClip.onRelease is part of the MovieClip class. When you read about it, it is for when the Mouse button is released and the pointer is over/on a given movie clip. Has nothing to do with keys, only the mouse and movieclips. If you want to do things with keys, I would suggest starting with the Key class and all the events and methods there.

          2. Check the information in the TextField class. You will notice that there is a TextField.text property. That is what you should use when comparing to the empty "" string. I don't know why the length property isn't working. Put the following right before your if statement.

          trace("The length is "+text_txt.length);

          3. To manipulate strings of letters you need the String class. Check that in the help files and I think you will need the String.toUpperCase() method.