For setting alpha values, wouldn't this do what you're talking about?

peopleCol.setStyle("fill", new SolidColor(_peopleColColor, _peopleAlpha)); This seems to work for my (slightly different) function. Maybe it will work for yours too.

Patrick




Brendan Meutzner wrote:
Ralf,

That's handy to know... just wouldn't be able to set the alpha value with the string implementation.


Brendan



On 2/19/07, * Private Romeo* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Thanks Brendan,

    Just found out that

    peopleCol.setStyle("fill", _peopleColColor);

    works, too, even if _peopleColColor is a simple String… Flex is…
    flexible!

    Rgds

    -Ralf

    *From:* [EMAIL PROTECTED] ups.com <http://ups.com>
    [mailto:flexcoders@ <mailto:flexcoders@>yahoogroups.com
    <http://yahoogroups.com>] *On Behalf Of *Brendan Meutzner
    *Sent:* Dienstag, 20. Februar 2007 00:03
    *To:* flexcoders@yahoogroups.com <http://ups.com>
    *Subject:* Re: [flexcoders] How to programmatically change fill
    color (Flex Charting)

    Hey,

    peopleCol.setStyle("fill", new SolidColor(_peopleColColor, 1));


    Brendan

    On 2/19/07, *Private Romeo *<[EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>> wrote:

    I have a SolidColor fill for a ColumnSeries object:

    <mx:ColumnSeries displayName="Staff" yField="People" id="peopleCol">

    <mx:fill>

                                    <mx:SolidColor id="peopleColColor"
    color="{_peopleColColor}" />

                    </mx:fill>

    </mx:ColumnSeries>

    In an ActionScript function I'd like to change the color of this
    fill, however neither data binding seems to work, nor directly
    accessing the property:

    function changeColor()

    {

      peopleColColor.color = 0xffff00; // DOES NOT WORK

     _peopleColColor = 0xffff00; // DOES NOT WORK (and is bindable)

    }

    Any hint?




-- Brendan Meutzner
    Stretch Media - RIA Adobe Flex Development
    [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>
    http://www.stretchmedia.ca




--
Brendan Meutzner
Stretch Media - RIA Adobe Flex Development
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
http://www.stretchmedia.ca

--
Patrick Reagan
Deodar Designs
Altadena, CA, USA
626/507-8232
http://www.d3tools.com

A FileMaker 8 Certified Developer
Member FileMaker Solutions Alliance

Reply via email to