<?xml version="1.0" encoding="utf-8"?>
<FxApplication name="Ellipse_fill_LinearGradient_test"
xmlns="http://ns.adobe.com/mxml/2009">
<layout>
<BasicLayout />
</layout>
<Script>
<![CDATA[
import mx.events.ColorPickerEvent;
import mx.events.SliderEvent;
private function colorPicker1_change(evt:ColorPickerEvent):void {
gradientEntry1.color = evt.color;
}
private function slider1_change(evt:SliderEvent):void {
gradientEntry1.alpha = evt.value;
}
private function colorPicker2_change(evt:ColorPickerEvent):void {
gradientEntry2.color = evt.color;
}
private function slider2_change(evt:SliderEvent):void {
gradientEntry2.alpha = evt.value;
}
private function colorPicker3_change(evt:ColorPickerEvent):void {
gradientEntry3.color = evt.color;
}
private function slider3_change(evt:SliderEvent):void {
gradientEntry3.alpha = evt.value;
}
]]>
</Script>
<Form>
<FormItem label="color 1:">
<ColorPicker id="colorPicker1"
selectedColor="red"
change="colorPicker1_change(event);" />
</FormItem>
<FormItem label="alpha 1:">
<HSlider id="slider1"
minimum="0.0"
maximum="1.0"
value="1.0"
snapInterval="0.1"
tickInterval="0.1"
liveDragging="true"
change="slider1_change(event);" />
</FormItem>
<FormItem label="color 2:">
<ColorPicker id="colorPicker2"
selectedColor="green"
change="colorPicker2_change(event);" />
</FormItem>
<FormItem label="alpha 2:">
<HSlider id="slider2"
minimum="0.0"
maximum="1.0"
value="1.0"
snapInterval="0.1"
tickInterval="0.1"
liveDragging="true"
change="slider2_change(event);" />
</FormItem>
<FormItem label="color 3:">
<ColorPicker id="colorPicker3"
selectedColor="blue"
change="colorPicker3_change(event);" />
</FormItem>
<FormItem label="alpha 3:">
<HSlider id="slider3"
minimum="0.0"
maximum="1.0"
value="1.0"
snapInterval="0.1"
tickInterval="0.1"
liveDragging="true"
change="slider3_change(event);" />
</FormItem>
</Form>
<Ellipse id="ellipse"
width="200"
height="300"
horizontalCenter="100"
verticalCenter="0">
<fill>
<LinearGradient>
<GradientEntry id="gradientEntry1" color="red" />
<GradientEntry id="gradientEntry2" color="green" />
<GradientEntry id="gradientEntry3" color="blue" />
</LinearGradient>
</fill>
</Ellipse>
</FxApplication>