2 Replies Latest reply on Aug 22, 2008 7:36 PM by texas_stingray

    Color Attribute

    texas_stingray
      All I am creating a visual component "bulletChart" just about finished, it that accepts attributes one of which is a color attribute. I would like for the developers that use the component to be able to pass the value in, in the format of #808080 for example for gray. When I run the application it does show up gray. My issue is that when developing in flex builder it show up black. the attribute data type is uint. If I set it to 0x808080 it shows up as gray in flex builder. what is the best way to handle passing in value like #808080 to a component and setting the color. I use a setter to set a bindable object to the objects color attribute.

      Thanks in advance for the help
      Scott
        • 1. Re: Color Attribute
          Level 7

          "texas_stingray" <webforumsuser@macromedia.com> wrote in message
          news:g8ms1o$bgc$1@forums.macromedia.com...
          > All I am creating a visual component "bulletChart" just about finished, it
          > that
          > accepts attributes one of which is a color attribute. I would like for the
          > developers that use the component to be able to pass the value in, in the
          > format of #808080 for example for gray. When I run the application it does
          > show
          > up gray. My issue is that when developing in flex builder it show up
          > black. the
          > attribute data type is uint. If I set it to 0x808080 it shows up as gray
          > in
          > flex builder. what is the best way to handle passing in value like #808080
          > to a
          > component and setting the color. I use a setter to set a bindable object
          > to the
          > objects color attribute.

          This might be helpful
          http://blogs.digitalprimates.net/codeSlinger/index.cfm/2007/4/9/Ah-design-view


          • 2. Re: Color Attribute
            texas_stingray Level 1
            Amy thanks for the reply. that is some good information but not quite what I was looking for. So, let me rephrase the question. If you are in the code view and see that the data type of a color such as a backgroundColor is a type of color. If you put something invalid the code produces and error. I want to allow the users (developers) to enter a "#FFFFFF" for a color and not have to enter a "0xFFFFFF". Can anyone help with that.