<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2008 Jason Graham

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
-->
<FxApplication xmlns="http://ns.adobe.com/mxml/2009" backgroundColor="#000000" xmlns:local="*" viewSourceURL="srcview/index.html">
	<Script>
		<![CDATA[
			import mx.skins.spark.FxApplicationSkin;
			
			//Colors and ratios used by the GradientBackgroundSkin
			[Bindable]
			public var ratio1 : String = "0";
			[Bindable]
			public var ratio2 : String = "1";

			[Bindable]
			public var color1 : Number = 0x888888;
			[Bindable]
			public var color2 : Number = 0x111111;

			protected function gradientBackground_clickHandler(event:MouseEvent):void
			{
				this.setStyle("skinClass", GradientBackgroundSkin );
			}

			protected function animatedBackground_clickHandler(event:MouseEvent):void
			{
				this.setStyle("skinClass", AnimatedBackgroundSkin );
			}

			protected function ellipseBackground_clickHandler(event:MouseEvent):void
			{
				this.setStyle("skinClass", EllipseBackgroundSkin );
			}

			protected function metalBackground_clickHandler(event:MouseEvent):void
			{
				this.setStyle("skinClass", MetalBackgroundSkin );
			}

			protected function radiobutton1_clickHandler(event:MouseEvent):void
			{
				this.setStyle("skinClass", FxApplicationSkin );
			}

		]]>
	</Script>
	<layout> 
	 	 <BasicLayout/> 
	</layout>
	<Panel width="300" height="200" id="selectorPanel" verticalCenter="0" horizontalCenter="0" title="Select Background Type">
		<RadioButtonGroup id="selectorGroup"/>
		<RadioButton group="{selectorGroup}" label="Standard Background" click="radiobutton1_clickHandler(event)" selected="true"/>
		<RadioButton group="{selectorGroup}" label="Gradient Background" click="gradientBackground_clickHandler(event)"/>
		<RadioButton group="{selectorGroup}" label="Animated Color Gradient Background" click="animatedBackground_clickHandler(event)"/>
		<RadioButton group="{selectorGroup}" label="Gradient Ellipse Background" click="ellipseBackground_clickHandler(event)"/>
		<RadioButton group="{selectorGroup}" label="Brushed Metal Background" click="metalBackground_clickHandler(event)"/>
	</Panel>
	<local:Reflector target="{selectorPanel}" width="300" height="200"/>
</FxApplication>