5 Replies Latest reply on Aug 23, 2009 12:51 AM by complexity

    basic actionscript help, tracing properties of my class object

    complexity Level 1

      Hi all,I'm just starting to learn about classes in actionscript, I am following along with Moocks book Actionscript for Flash MX and are trying to execute a trace on the properties of my ballclass but all I get is undefined. He is what I have in my actions panel.

       

      function Ball () {
          this.radius = 10;
          this.color = 0xFF0000;
          this.xPosition = 59;
          this.yPosition = 15;
      }
      var boucyBall = new Ball();

       

      trace (bouncyBall.radius);
      trace (bouncyBall.color);
      trace (bouncyBall.xPosition);
      trace (bouncyBall.yPosition);

       

       

      Any help would be great