1 Reply Latest reply on Jan 5, 2007 4:54 PM by Newsgroup_User

    no property name

    malachidj Level 1
      I found this beautiful color wheel app..
      http://www.peterjoel.com/Samples/index.php?go=cmyk

      When I publish it in AS 2.0 I get this error:
      There is no property with the name 'RGB_to_HSB'.

      Color.RGB_to_HSB = function(colRGB) {
      }

      Can this logic be easily updated to AS 2? If not, can someone point me in the right direction? I have searched the forums and read the AS Migration documents and couldn't find anything in my language.
        • 1. Re: no property name
          Level 7
          > Color.RGB_to_HSB = function(colRGB) {
          > }

          For a start .. thats a bit odd assigning an empty function to it (maybe you
          just removed the guts of the function for clarity)

          To do what you want try:

          Color["RGB_to_HSB"] = function(colRGB) {
          }

          or, if that fails

          var RGB_to_HSB_name = "RGB_to_HSB";
          Color["RGB_to_HSB_name"] = function(colRGB) {
          }
          --
          Jeckyl