3 Replies Latest reply on Sep 18, 2008 3:22 PM by Ansury

    How does Color Picker UI Component work?

    Bryan Dresselhaus
      Does anyone know how to mimic the color picker UI Component's functionality so when you click on a UI Component a visual object slides into view?

      I am trying to create a custom UI Component that is based off a button. When you click on the button I want to open a grid of special ascii characters that slides into view in close proximity to the component. Anyone who has used the color picker component will know how it looks. The color picker works by clicking on it and then the color palette slides into view.

      I'm just not sure how to slide into view the UI Component that would contain my grid.

      Any advice?

      Thanks.
        • 1. Re: How does Color Picker UI Component work?
          Gregory Lafrance Level 6
          Use states, and effects, either a wipe effect, or else a custom effect.
          • 2. Re: How does Color Picker UI Component work?
            Level 7
            "Bryan Dresselhaus" <webforumsuser@macromedia.com> wrote in message
            news:gau9pm$r9g$1@forums.macromedia.com...
            > Does anyone know how to mimic the color picker UI Component's
            > functionality so
            > when you click on a UI Component a visual object slides into view?
            >
            > I am trying to create a custom UI Component that is based off a button.
            > When
            > you click on the button I want to open a grid of special ascii characters
            > that
            > slides into view in close proximity to the component. Anyone who has used
            > the
            > color picker component will know how it looks. The color picker works by
            > clicking on it and then the color palette slides into view.
            >
            > I'm just not sure how to slide into view the UI Component that would
            > contain
            > my grid.
            >
            > Any advice?

            You could probably use States.

            HTH;

            Amy


            • 3. How does Color Picker UI Component work?
              Ansury Level 3
              I never use states, they seem to turn into a maintenance nightmare. Also, the syntax is likely going to change in Flex 4 with the old syntax deprecated. (But that's just how I feel about them.)

              This could be a nightmare as well, but you do have the SDK source. Find ColorPicker.as and see how Adobe does it. Maybe you could pull the guts out of how that works and provide a re-usable component that works similarly. No sense re-inventing the wheel unless the previous design is a "complicated functional disaster". (Which it may be.)

              Or perhaps a transparent popup window, with a transition of a visible component into view? States may be the way to do it but I'd hate to resort to that.