flex LinearGradient without mixing colors

109 views Asked by At

Is there are any way to make LinearGradient with 3-4 or more GradientEntries without mixing their colors. When scaleX="0" colors are not mixed but middle colors almost invisible.

        <s:LinearGradient rotation="45" scaleX="0">
            <s:GradientEntry color="#ff0000" />
            <s:GradientEntry color="#00ff00" />
            <s:GradientEntry color="#0000ff" />
            <s:GradientEntry color="#ffff00" />
        </s:LinearGradient>
1

There are 1 answers

0
Anas Bin Numan On

Try giving them a hard coded ration e.g

        <s:GradientEntry color="#ff0000" ratio=".25"/>
        <s:GradientEntry color="#00ff00"  ratio=".25"/>
        <s:GradientEntry color="#0000ff"  ratio=".25"/>
        <s:GradientEntry color="#ffff00"  ratio=".25"/>