3 Replies Latest reply on Jan 3, 2010 8:44 AM by OblivionKnight

    nested if statements

    OblivionKnight Level 1



      I hope you can help


      I have a if statement that first checks to see if the enter key is pressed. Although i cant figure out how to to nest futher statements with in that initial statement. At the moment I'm checking for an enter keypress like so:


      if (Key.isDown(Key.ENTER)) {


      I suppose immediately after i want the script to see if a a textboxes variable is empty or not.


      IF its empty run x code


      IF it has content run y code.


      Seems straight forward enough but i cant seem to figure out how to nest them under the first Enter key IF check.


      Any advice gratefully received.