<?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">
<!-- in this example a graphic is created using gradients and the HSlider
is used to control the alpha level of the image -->
<s:VGroup horizontalCenter="0" verticalCenter="0" horizontalAlign="center">
<s:Graphic>
<s:Rect id="rect" width="300" height="200">
<s:fill>
<s:RadialGradient>
<s:entries>
<s:GradientEntry color="red" />
<s:GradientEntry color="white" />
<s:GradientEntry color="blue" />
</s:entries>
</s:RadialGradient>
</s:fill>
</s:Rect>
</s:Graphic>
<s:Spacer height="50" />
<s:HSlider id="slider" minimum="0" maximum="1" value="1" stepSize="0.1"
snapInterval="0.1" liveDragging="true" change="rect.alpha=slider.value;" />
<s:Label text="Alpha: {slider.value}" />
</s:VGroup>
</s:Application>