1 Reply Latest reply on Feb 17, 2015 10:36 AM by xbytor2

    Passing an object to SolidColor() class

    nonamephjoto Level 1

      Hi! I want to pass an object into SolidColor class in one sentence (object) but I get an error: Object Expected.

      I think I'm passing an object.. but I don't know what's the problem :S

       

      like:

      var color = new SolidColor()

      color.rgb = {"red":255, "green":255, "blue":255}; // <--

      app.backgroundColor = color;

       

      instead of:

      var color = new SolidColor()

      color.rgb.red = 255;

      color.rgb.green = 255;

      color.rgb.blue = 255;

      app.backgroundColor = color;

       

      Thanks!!!