3矩形が欲しいと言っていませんか?グラデーションが必要ですが、ソリッドカラー(グラデーションなし)が必要です。
このような意味ですか?
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
minWidth="955"
minHeight="600">
<s:Rect id="rectangle1"
height="15"
width="300">
<s:fill>
<s:SolidColor color="0x0" />
</s:fill>
</s:Rect>
<s:Rect id="rectangle2"
top="15"
height="70"
width="300">
<s:fill>
<s:SolidColor color="0xff0000" />
</s:fill>
</s:Rect>
<s:Rect id="rectangle3"
top="85"
height="15"
width="300">
<s:fill>
<s:SolidColor color="0x0" />
</s:fill>
</s:Rect>
</s:Application>
そうでなければ、この種のこのようなあなたの目標を達成することができます
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
minWidth="955"
minHeight="600">
<s:Rect id="rectangle1"
height="100"
width="300">
<s:fill>
<s:LinearGradient rotation="90">
<s:GradientEntry color="0x0" ratio="0" />
<s:GradientEntry color="0x0" ratio=".2" />
<s:GradientEntry color="0xff0000" ratio=".2" />
<s:GradientEntry color="0xff0000" ratio=".8" />
<s:GradientEntry color="0x0" ratio=".8" />
</s:LinearGradient>
</s:fill>
</s:Rect>
</s:Application>
これは、それが必要なものを正確に感謝です!私は比率を設定する混乱してしまった。 –