1 Reply Latest reply on Feb 10, 2008 4:17 PM by Ratsnackbar

    Elements of Class

    Ukie_239 Level 1
      Is there a way to loop through all the public properties of a class within the class itself? I know i can do it outside the class, but I want to have a method inside the class to set all the values automatically

      Thanks
        • 1. Elements of Class
          Ratsnackbar Level 2
          Never had reason to do this but this might work

          for(var variableName:* in this){
          trace( this[variableName] );
          }

          That would get you the variable names (I think) which you could then loop through and set values.

          If it does let me know as I may find I need that somewhere.
          :D
          -Joe